in a side scroller, i don’t recommend that you attach the camera to the pawn. and even if you do keep it inside the pawn, it should have some code that updates its location every tick, based on more than just the players position.
usually side scroller cameras follow the pawn loosely, so the player can turn around without moving the camera, and the camera should have extra rules for when the player goes too high or too low. many side scrollers have the camera stop at a door, and when the player goes through the door, the camera catches up on the other side, kinda like megaman rooms.