Your gym doesn’t have lockers? I use my phone as a music streaming device at the gym, and there is always somewhere to set it down whether I’m using cardio or strength training equipment. Another potential solution is to buy a ring or bracelet that you can use as a key like this one:
TAPTES® #1 smart ring for Model Y Model 3. Easily lock, unlock and start driving your Tesla Model Y Model 3 with a finger tap, as quickly as the factory key card. Waterproof, free shipping worldwide.
www.taptes.com
Then don’t set your phone up as a key so it wouldn’t matter if you left it in the car. I’ve never used one of these so I can’t endorse a product; I’m sure there are threads discussing these rings that you can search.