This looks similar to this FFTW.jl issue.
I have also run into this issue recently. One workaround which has been suggested is to use the MKL FFTW interface. I tried this some time ago and initially run into performance issues when using MKL and threads. If it helps, after some trial and error I’ve written here about the “proper” way of using the MKL provider which avoids these issues.