Probably the best thing to do is to recast 90% of his scenes. It would mean a delay but so be it.
Ezra could be in the first few minutes.
He tries time travel, but at the same time, other barrys on alternate Earths are doing the exact same thing.
He races off and disappears into the speedforce.
we see several dozen Variations of Flash in the speed force. All get scattered.
Almost instantly another different barry/flash appears on our Earth.
He is now stuck here, as are the other barrys on all the other Earths.
This Barry ends up trying it again and that is the reason we see Keaton's Batman.