I’ve done that. We lived on a hill at our old house. One day I pulled up and stopped in front of the house in my SUV, jumped out, started to close the door and the SUV started moving backward. I leapt back in, hit the brake and put the vehicle in park. I was lucky.
years ago, my brother and I had the same model car. His was auto, Mine was a stick. I had to borrow his for a couple days while mine was in the shop. My house was on a slight hill and I typically left it in gear and hopped out. I forgot to put his car in park and hoped out, only to see the car roll away. I managed to catch it and hop in before any damage occurred.