Take it apart and clean and lube it. I don't know what that trailer has for a door latch, but our
Uhaul that has the big square Bargman L300, it wouldn't lock on the inside unless the key was in the center of it's travel. I took ours apart, cleaned it, and lubed it with white grease, the key still has to be in the right position to lock it on the inside.