I do the same... I have a 2016 Forester and pop the hatch up and use that as a shelter while I sit in the car... obviously it's not 100% safe, but it does offer some protection AND can give you a little portable shelter from rain and wind. Another thing I have done a couple of times, particularly if I am needing to remain mobile or the lightning is just too close for comfort, I got a window mount that I can put the camera on and shoot from there without even having to leave the driver's seat. It's not the best as it is more sensitive to vehicle movement than say it being outside on a tripod, but it's good in a pinch.
A couple other techniques I've used in the past... wifi remote to the camera. I will set it outside my car on the tripod (and rain gear if needed) and use the remote shutter to take the pictures and can be totally closed off in my car. I've run the cable release through a crack in the car window before as well (this won't do you much good if the camera gets hit). Also, you COULD try and have your camera automatically take pictures, so set it to take X-number of pictures on the settings you want and let it just go through however many pictures you program it to take. A few out-of-the-box methods if absolutely need be.