The Codeberg thing is not surprising. And once again the proof that "it's somebody else's computer".
GitHub is Microsoft is USA. GitHub is/was therefor restricted in places like Iran, North Korea, China, Russia, Syria, Crimea, etc.
Codeberg preventing usage of something under their ToS is similar, they can do whatever they want.
If you must avoid such situations don't use centralised solutions / somebody else's computer.