Camera sees through objects when camera gets to close to the object

Whenever the camera gets to close to an object, say a rock or a pawn, said object or pawn ‘dissapears’. See the rock here:


If an AI just gets near the player when in play mode the AI and the ground does the same as above. How can I prevent that this happens?

Edit: And no, the camera doesn’t go inside the object. It happens when the object is as much as 10 meters/32 feet away.