Samsung A5 (2017) why USSD codes don't work?

A

AC Question

I can't check the balance or top up my phone, every time I try to run USSD code, there is a message pops up: "Connection problem or invalid MMI code".
I tried to google and used everything: adding "+" ot ",", manually choosing mobile network, restarting the phone, etc. Nothing helped.
Did someone find a way how to fix it?