The bureaucracy is tough and will do extraordinary things to protect itself. Their view is that presidents come and go, but the bureaucracy is permanent. They know how to defend their empires.
Being from the private sector Trump was used to having his direction followed. He wasn’t used to insubordination and people putting their self interests above the company.
Once one agency was able to frustrate him it opened the door for the rest of the agencies to do the same.
Trump never really established control over the bureaucracy IMO.
IMO, it all hinged on Trump’s first year. 2017. Gowdy has said he knew the FBI was lying to Congress regarding FISA and did nothing about it. President Trump’s term became a dead letter once it became clear in 2017 that the GOP was fully supportive of the coup. Trump was never going to win a political battle with the bureaucracy, media, Democrats AND his own party. I wish it was different but it is what it is.
His own party undermined him. Worse, they undermined what their own voters wanted their president to do.
With strong backing and support from the GOP he could have achieved better control over the bureaucracy, which is almost entirely staffed by liberals now.
In short, the GOP betrayed him — and us.