I had a similar issue and was able to solve it by following workaround:
https://github.com/orgs/primefaces/discussions/353#discussioncomment-11320298