Dynamic class generation problem
If class names come from a database, CMS, user configuration or runtime string construction, Tailwind may not see the complete class names during source scanning.
Use explicit source candidates
Tailwind v4 can use @source inline() to explicitly generate classes that would otherwise not be detected. This is preferable to relying on old v3 configuration patterns without checking version compatibility.
Better application architecture
Whenever possible, map runtime values to a finite set of complete class strings. This gives you both predictable generated CSS and a controlled design vocabulary.