Two things.
1.) Russia no doubt (At least in my mind) underestimated Ukraine warfighting capability. Notice that even with light anti-tank weapon like N-Law the British give them, and Javelin (From the US), those are still quite capable weapon if they were used in a right condition. Now, we all know the Ukrainian have those weapon, that is not even a secret. But I sincerely think the Russia either do not think Ukrainian know how to deploy them effectively, or even worse, they either discounted them or ignored them.
2.) Ukrainian have been adapted to how Russia fight, and Russia did not change their playbook any. Bear in mind Ukrainian has been fighting and resisting the Russian for 8 years, they should be more than adapted by now. And what Russia doing now is no different then when they were doing in Donbass, they are only doing it on a bigger scale. Which mean the Ukrainian still know where and when to hit the Russian to make it hurt.