You cannot ban it unless you start deep inspection of people conversations. You can easily sneak public keys disguised as regular conversation and then encrypt messages offline and disguise as well.
And I'm sure the government doesn't expect a perfect ban. By going after platforms you'll take the ability to engage in secure E2EE messaging away from a large part of the population.
E2EE messaging that required coordination was already possible for decades and the governments didn't mind that as much.
Users that send too many encrypted blobs can simply be banned by platforms as suspicious (and I wouldn't be surprised if that's happening already). Exchanging files is easiest to detect by centralized platforms and hardest to do efficiently with good delivery assurances in reasonably anonymous decentralized systems.
E2EE messaging that required coordination was already possible for decades and the governments didn't mind that as much.
Users that send too many encrypted blobs can simply be banned by platforms as suspicious (and I wouldn't be surprised if that's happening already). Exchanging files is easiest to detect by centralized platforms and hardest to do efficiently with good delivery assurances in reasonably anonymous decentralized systems.