I don't think wifi can wake up the car once it goes to sleep. It may keep it awake, but as your car is actually sleeping sometimes it seems unlikely this will be the cause. You may want to think about changing the password on your Tesla account to force all connected apps to log out. You'll need to regenerate tokens for the apps you want to use, but at least you'll be certain nothing else is communicating with the car that you may have forgotten was connected.I'll try turning the wifi off on the router so the car is not connected to any access point at all and see if anything changes.
I don't know what the status of generating API tokens is at the moment though. There have been posts from some with issues, not sure if they were one-offs or a general API issue. Worth reading back in some of the threads if you intend to go that route I guess.