If you contributed to the Jackpot Trail before leaving the machine, you will earn your share of the Jackpot once the other players on the machine complete the trail. The Jackpot will only pay out once it is triggered. If everyone leaves the slot machine before the Jackpot is unlocked, the progress may be lost.
There is no option to return to the same slot machine room once you leave, as you will be placed randomly into a slot machine room each time. Make sure to remain in the machine and keep spinning if you want to unlock an even higher Jackpot.