Hide gameObjects which are blocking camera's view

Hello,
I’ve been trying to hide an object which is blocking my camera’s field of view, but I cannot come up with a suitable solution
In my scene, I am playing with rotation and it can happen, that boxes are blocking my view - as in the picture below.

I would like to have a solution, which would look like following picture - where boxes are not blocking my view. Of course if I rotate 180 degrees, I would see them.

Do you have any idea, how to solve it?
Thanks

Increase the camera’s nearClipPlane. I believe this works in 3D too, but I know that at least in 2D increasing the main camera’s nearClipPlane will make things that are too close to the camera invisible.