It's just hilarious really that this is even a problem
The problem:
Users whose DNS servers can't resolve rage.mp (or possibly other service domains - couldn't dig too deep into this as I was helping a user, not having the problem myself) during gameplay may face random freezes up to a few seconds long (request timeout period).
It should be noted that this problem was present even on empty local freeroam server without any additional scripts loaded.
The fix:
Don't do whatever is happening in the main thread, like, WHY?
And yeah, for those who experiences random freezes (on otherwise beefy hardware with stable 60-144+ FPS): change your DNS servers to something fast and reliable, like 1.1.1.1 and/or 8.8.8.8