Ideas
I have the same issue: sims ignore general locks on doors and gates.
I want one sim to be in charge of gardening, so I tried to lock the gates in the garden to all except this one sim using the "Lock for everyone except This Sim" option.
There are 5 other sims in the same household, going from toddler to YA. All ignore the lock and go through the gate.
I've noticed that, when I use the option "Lock specific sim" from going through a door or gate, the setting appears to hold better, but this has not been consistent.
I've seen the "Lock for everyone" option work, but the one to let one sim use the door or gate doesn't work.
I play on PC, patched to the latest version.
Tested without mods and it happened. With a mod that improves the lock system, it still happens.
I've set doors and gates on their 2 sides and it happens.
I have no business on the lot, it's household sims and NPCs, I don't own Businesses and Hobbies.