Hope there are some good answers to this. Having same issues with my older RVs. Problem now is they have tried to make different keys in sets so everyone with an RV can't open your RV compartments. But then you have some locks with one key number and some with another so you need more keys on your key ring.
Trouble is the sets of locks you get in a bag have keys made of some cheap metal that twists with the slightest turning strain, and the ends break off in the locks, and the keys get stuck in the locks so you can't pull the key out. It is all very frustrating.
The compartment doors are so thin but not all the same so you have to get the right length to fit. As noted in the OP, the catch to keep it in place is not very good. The screw holding the latch tab won't stay tight either.
Needs a dedicated spray can of penetrating oil just to keep all the locks working each trip. Phooey! So I'm with the OP hoping for the correct answer.
Here are some, no idea which are any good.
https://www.amazon.com/rv-compartment-locks/s?k=rv+compartment+locks