Edit: Looks like forcing the lock to stay up is the best option, plus adding a hook-and-eye latch to keep the cats (one of whom particularly reckless) from getting onto the roof by way of the balcony.
When I go onto the balcony and close the screen door behind me, the lock falls down into the locked position. (Conveniently, this mostly happens when I’m not wearing pockets and therefore don’t have my phone.)
The lock doesn’t seem to be loose, or at least the screw won’t go any tighter. I don’t think I’m closing the screen any more firmly than necessary.
Other than trying to remember to instead close the glass door behind me — passing through doors happens on autopilot so I’m very likely to forget — is there some way to prevent locking myself out? Or is it working as designed and I have a head-in-clouds problem rather than a flaky-door problem?
Oh I like the magnetic key idea, that might be the new winner.