The fact that you're arguing Mearsheimer doesn't know what he's talking about based on him not having thought that Russia would invade Ukraine shows what an utter clown you are given that pretty much nobody in the west predicted that. You don't have to link to anything, it's pretty clear from your comments what "experts" you rely on.
Yes, nobody in the west predicted that and the state department was even saying it was unlikely. Shit, you really should've called them up and told them!
There was zero chance of NATO accepting Ukraine in 1997 as anybody who has any clue at all understands. Meanwhile, what would've actually prevented this war was for Ukraine to declare neutrality and renounce NATO ambitions. That option is certainly going to look pretty good when this is all over.
The Baltics joined NATO in 2004, Russia did nothing despite long control over the region and a large Russian minority. Had Ukraine been in this position the whole war could have been avoided, since Russia would not invade a NATO country