That is not possible to do. The camera affects everything the same. The analogy is that it’s like you are using a camera to take a picture of a stack of papers. You can move the camera all you want, but the papers (frames on layers) will always be in the same spot relative to each other.
There are however other things you can do to achieve this effect. You can manually rotate the background (see this video if you don’t know how to do this: https://www.youtube.com/watch?v=8AzdWEDPBG0). Alternatively, and this is the way I would recommend you do it, you use the camera to rotate everything, but do not export the background. Instead, export an image sequence with transparency enabled and the background hidden. Then use a video editor to put the exported rotating spaceship over your static background image. You could even just import the sequence back into a new Pencil2D project if you really wanted.