Why does refreshing used classes remove needed Tailwind CSS classes from stylesheet?

Working away with a new project, I made good progress (thanks mostly to using Mr Pinecone with Claude). At a point of satisfaction, and still discovering PG features, I decided to modernise a bit and switch to TW4 as well as choosing component styles.

I can’t give details of the steps to reproduce my problem as I’ve been clicking everywhere to try things out, but at some point TW decided to update its CSS file and remove a bunch of classes.

As a result, my layout went very askew. I can see TW classes in my HTML file which are gone in the CSS. I’ve been using GIT (through VSC) and when I revert the CSS file, everything looks sweet again. But as soon as I open a particular HTML file, PG updates the CSS and everything falls apart.

In my efforts to resolve this, I’ve de/re-activated the styles panel. I’ve switched back to TW3 (compiler settings). I’ve chosen the option to refresh used classes. In fact, I’ve just discovered it’s the refreshing of used classes which initiates the removal of the classes from the generated file.

Any suggestions of how to fix the issue?