I encountered this problem about a week ago after flashing CleanRom 18.104.22.168 (to fix the speaker bug on my XD+ VR). I had previously been running CleanRom 22.214.171.124 for a few weeks without a single WiFi issue.
I fixed it by going into TWRP (power on while holding VOL+), doing an advanced wipe of everything, doing a factory reset, then a power off. I then fired up the flash util and reflashed the rom. My WiFi is working 100% again, give it a try, hopefully it works for you too.