Wifi connection randomly cuts off and after clicking WiFi icon it just comes back

quick recap of what I did.

Disabled Mac address randomization.
Disabled IPv6
Follow the solution of this thread step-by-step:RTL8821CE - When idle, wifi drops and works only after reconnecting - #14 by tbg

contacted internet provider and they fully restarted my router settings.

UPDATE: connection cut still happened. This time I detected it with steam while playing online game for testing reasons. I got disconnected and after clicking WiFi icon magic happened and I got reconnected.

UPDATE:So after connection cut my device was not even detecting internet connection so I had to Snap back.