How can I stop the camera from switching back to the launcher?
As an alternative to this answer from beeshyams, if you cannot afford to replace your preferred camera app than try screen pinning that app.

You can pin an app's screen to keep it in view until you unpin it.
For example, you can pin an app and hand your phone to a friend. With the screen pinned, your friend can use only that app. To use your other apps again, you can unpin the screen.

Alternatively, you can use a kiosk-mode app from Play Store to temporarily restrict usage of the device to your camera app.