Second UI camera only works when I refresh Clear Flags setting

I have a UI camera, and the canvas that it is displaying is set to Screen Space - Camera; Render Camera - UI; Plane Dist - 1. The UI camera has culling on UI only, and for Clear Flags I’ve tried both Don’t Clear & Depth Only.

When I select either of those two clear flags settings, the UI is successfully displayed in my editor’s game view. But when I hit play, it stops displaying the UI. However if I adjust the clear flags setting while I’m in play mode, the UI will start displaying again. Then, when I drop play mode, the UI actually stops displaying even in the editor’s game view… until I adjust the clear flags setting again. But when I hit play mode again and it stops displaying again.

What’s strange is that it doesn’t matter if I’m on Don’t Clear or Depth Only. For example, I’ll select Depth Only and the UI works. Then I hit play and it stops. While playing, I adjust to Don’t Clear and it works until I stop playing. If I also switch back to Depth Only again, while playing, it will still display the UI even though it hadn’t been working when play mode was initially pressed.

How can I stop this from happening?

It seems the camera won’t work when the game builds. But if I refresh the clear flag setting during runtime, to either don’t clear or depth only, it will work. What could be causing this?