Elon has been so hands-on and vindictive that it's hard to rule out him personally deciding to ban pg and then going back on it, but that's not the only possibility. If you looked at the replies to pg's initial "I'm leaving" post, there were hundreds or thousands of Elon's reply guys mocking him or deriding the decision. Twitter has become much more of a toxic hellhole than it was before.
What I've noticed is that accounts tend to receive bans when a large number of users report them simultaneously (whether they are actually rule breaking has relatively little impact). It strikes me as possible that a bunch of Elon's fans reported the "I have a Mastodon account" post, and some moderator pulled the plug on the account on the assumption that that's what Elon would want.
To be clear, I'm not saying any of this would exonerate Elon. He put this stupid policy in place to begin with. If anything, the sheer scale of the pro-Elon toxicity I've seen in every Twitter link I've clicked today is a symptom of a much bigger problem that is slowly building on the platform.