I kept mine in a 24 gallon tank with no lid. He was housed with some small gobies, and was the largest fish in the tank. Also, tank had a 5" deep sand bed, so he was able to make himself a nice deep burrow. I think these are the key pieces-fish don't go jumping out for fun, they get spooked and it's a last resort. Give them a setup they're happy in, and they won't be going anywhere. To a degree, power shut off to that tank while I was away on vacation, was off for enough time that the water in the skimmer went anaerobic, and when the power came back on, it flushed into the tank and wiped out everything. Jawfish was still in his burrow when I found him

But still, even when the tank went toxic, he didn't feel the urge to jump, his natural defence of hiding in his burrow was the most powerful instinct.
Want to get another one one of these days, but don't have a tank where I could put that deep of a sand bed as of yet.