The issue here is that the UICam has its Background set to "Uninitialized", and this uninitialized data results in graphical artifacts.
The correct way to render multiple cameras on top of each other is Camera Stacking. In this particular example, setting the UICam to "Overlay" solves the issue. Kindly refer to https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/camera-stacking.html for more information