Yes, it works with the PS4 (I don't know about the PS5). Unfortunately, you can no longer use the buttons on the headphones to turn up the volume, for example. I found that a bit tedious for gaming.
In addition to Samsung mobile phones, the microphone also works perfectly with Dell notebook computers in conjunction with the QC25. This does not answer the question, but at least the microphone function is not limited to Android or Samsung.