In my case I updated the primng to version 19, but my primeflex was still at 3.2.2, I updated the primeflex to version 4.0.0 and styles started working again. See the guide https://primeflex.org/installation