my guess is the spring that holds the pawl in the latch that secures the latch lever is broken or the pawl is rusted up or worn out.

your options
try lubing with penetratant and hope it free up.
disassemble and repair latch
most likely you probably need a new latch


perception is 90% of reality