I was digging more and it looks that some of the dependencies I use are using DEBUG flag (as well as esp8266 arduino framework). The problematic libraries were EspAsyncWebServer and Sha256 (at least for me).
My code was using DEBUG flag as well which appears to be conflicting with arduino framework.
I’ve fixed the issue by replacing DEBUG in my code to sth different (like DEBUGLOG). I’m not using DEBUG flag anymore (so now there’s no conflict between arduino and my code). I know it’s a workaround but it’s working fine.
I hope my solution will help somebody if run into this problem again. It looks that the problem is related to some of the latest changes to esp8266 arduino framework (not platformio).