The RV outlet boxes are anchored by two fingers that swing out on diagonal corners. A finger may have broken or may simply have loosened. There are screws at the corners that pull the fingers against the inside of the wall. If the fingers are undamaged, you can loosen the screws, fold the fingers back against the box, and reinsert the box in the wall. Holding the box in place, tighten the screws. The first rotation of the screws swings the fingers out behind the wall. Tighten the screws, but do not over tighten.
If a finger on the old box is damaged, go to HD, Lowes, or such and buy a repair box, an outlet, and a plate. Ask if you need help choosing a repair box. The repair boxes attach to the wall with swinging fingers, just like RV outlets. With power off, detach the RV box and attach the wires to the new outlet through the rear openings in the repair box. Attach the box to the wall just like I described for the damaged RV outlet. Attach the plate and you are done.
John W. Irwin
2018 Interstate GT, "Sabre-Dog V"