Just some thoughts
put invisible sprites in the way of obj_player as trigger points when the camera has to freeze
when camera is in freeze mode obj_player will be bound to screen
if obj_enemies are destroyed reactivate camera
And yes, you could do
if camera is in freeze - create solid object left and right of the screen.
Or if player ist at Y<=0 then move player +Y 5
or ...