Lock exit
take potion bag
Unlock exit
Something like that?
I'd figure you'd have to edit the take or drop something somehow, but I don't know how.
On the Inventory tab, go to the "After taking the object" bit (only appears if object can be taken is ticked), and add an Unlock Exit script.