In "UI/MiscData.txt", set both "GoldTextLifetime" and "LumberTextLifetime" to 0.
Depending on the game version you are using, you'll need Ladik's MPQ Editor (for the legacy versions) or CascView (for Reforged) to get that file.
Also, if you want to enable this mod without relying on the imports like Vazio said, place the "UI/MiscData.txt" inside "retail" folder with Local Files enabled.
You can hide the floating text for resource count using that trick, but you can't actually change something like the colors as it's hardcoded.