Gotcha! That makes sense.
Personally, after far too many occasions wondering why styles aren’t present in production environments, I avoid string concatentation for classes altogether now even though I’m now using Tailwind 3 in JIT mode, so it’ no longer an issue anyway.
Only thing I can think of is that maybe your postcss process is running before hugo_stats is written to disk?