There's no way to stop Roblox from kicking you out of a game after it detects you're AFK for about 20 minutes If the game takes you somewhere else when you're AFK, they'll likely have their own detection with a smaller idle range.