That’s because the camera is clipping into the wall. You need to increase the size of the collision capsule of the player to prevent the camera from getting too close to the wall.
Thanks Sklor!
Closing this topic as a duplicate of player can see through walls when the move their camera towards edge @Everynone