All you have to do is when you snake is coiled tight around the prey's body and hanging out of the enclosure is grab him and put him back in it, I have to do that quite often with females this time of the year and it's not an issue.
As for retrieving a prey in your boas enclosure this is where a small hook to keep the animal away and a pair of snake tongs is necessary.