The whole episode has me baffled as well. The idea of it being a false flag or a sneaky way to move Wagner to Belarus makes zero sense on any level. Six helicopters, a plane, and an oil refinery seem like a pretty steep price to pay in exchange for...what? Prigozhin, as bad as he is, doesn't strike me as being the type to blindly rush into something ("Russians don't take a dump, son, without a plan"), and the sudden pullback when on the verge of victory (of some sort) was unexpected.
The only thing that makes sense to me is that Prigozhin overplayed his hand and Putin pulled out some sort of pocket aces. I've seen it speculated that Putin may have made some stronger-than-expected retaliatory threats to Prigozhin, and offered him a face-saving exile into Belarus. I don't quite understand what would prompt Prigozhin to trust Putin to keep his end of any bargain, though. Prigozhin will likely never feel safe the rest of his life.
As for the effect on Ukraine, I want to say that this is a win. A fresh, well-supplied Russian army bogged down within a couple dozen miles after entering Ukraine. Ukraine has had a *year* to fortify that northern border, and they've been doing it extensively. The terrain there, as I understand it, limits movement to the roads pretty well, and Ukraine is guarding (and mining) those roads.
The net effect, as I see it, is that Wagner is out of the fight for the time being, and that's a big loss to Russia. These are a lot of the better-trained, better-equipped, and more experienced and effective fighters Russia has, and now they're on the sidelines. Putin is trying to get a lot of them under Shoigu's command, but even if he gets some, he's lost a lot. Maybe he plans to strip Wagner of all their equipment and send it to the regular troops?
In other news, it sounds like Ukraine has crossed the Dnipro River at Kherson, and is expanding a bridgehead. That's also big trouble for Russia, who recently shifted a lot of forces away from the Kherson region to reinforce areas further east.