When Rick and Pete fought, it only seemed even because Rick was holding back. Pete is 6'4 and going all out, while Rick is 5'10 and deliberately pulling his punches. Pete’s massive height and size advantage should have easily dominated the fight, yet the best he can secure is a brief, even brawl before getting completely overpowered. Rick only dragged it out because he needed Pete’s abuse exposed in public—Deanna already knew and actively ignored it because Pete was a surgeon, and nobody else in Alexandria knew he was hitting his family.
This is feral Season 5 Rick we’re talking about. Even when Pete pinned him to the wall inside, Rick easily could have gouged his eyes out or ripped his throat out like he did to Joe. Instead, he kept it a street brawl, effortlessly broke free, and flipped their positioning. Look closely right as the glass shatters—Pete is the one in front, meaning Rick literally drove and pushed him straight through the window. A 5'10 man launching an angry, full-grown 6'4 man through a window is no easy feat, and it shows just how completely outmatched Pete really was.
Even when they crash outside and Pete flips Rick over, it’s not because Rick was losing—Rick let him get up. If Pete stayed pinned down, he’d be physically incapable of losing his temper and hitting Jessie in front of everyone. The exact second Pete hits Jessie and exposes his abuse to the entire town, Rick instantly flips him right back over and puts him in a chokehold. That timing is too perfect to be a coincidence—it proves Rick was just baiting him and in total control the entire time.
On top of that, Rick had a gun on him the entire time. When he was ranting at the town after he defeated Pete. If Rick was ever actually struggling or in real danger, he could have just pulled it and shot Pete instead of brawling.
And in the very next episode, Pete proves it himself by marching into the town meeting with Michonne’s katana—cowardly admitting he couldn't beat Rick empty-handed. Despite being taller than both Rick and Abraham, and despite being drunk, armed, and in a murderous rage against an unarmed opponent, Pete gets instantly tackled and effortlessly neutralized by Abraham. All it took was one clean swing with a katana to stop Abraham, yet Pete couldn't even land that or put up enough resistance to make Abraham break a sweat. If Pete were genuinely capable of matching Rick in a real fight, he would have at least given Abraham some difficulty. Getting folded in seconds while holding a sword confirms Pete was a true paper tiger—and completely out of his league against Rick.
Tl;dr: Rick was never struggling against Pete—he held back, had a gun the whole time, and literally let Pete get back up outside so Pete would snap and hit Jessie in front of the town. Despite being 6'4 (taller than both Rick and Abraham), Pete was the one in front when Rick pushed him through the window, and he later got effortlessly folded by an unarmed Abraham even while holding Michonne’s katana. Pete was a total paper tiger.