I have now sorted this issue, I will write how I sorted this below so if anyone else gets this problem they will know how to solve it.
Ok so as mentioned my CFW switch would not trade wireless local communication in Y-commn on pokemon SW/SH when using CFW to trade to my non-CFW legit switch, no matter if either console was connected to the internet fully or using 90DNS or if either wasn't connect to any WIFI at all and just using the wireless, I tried it all sorts of ways it would not connect however if the CFW switch was back in non-CFW mode they would connect wireless perfect.
I could put the SD card in my laptop and modify the save on PKHex put it back in the CFW switch and the modify save file would be there and it would play off from where I left it but no matter what way around it, it would not connect via wireless locally communication in Y-commn to my non-CFW switch note: both switches were on the same software versions 10.0.2 and both SW/SH where on the same software versions as well 1.1.1 so it wasn't to do with software versions in the consoles or games.
Y-commn would work as it should when the CFW switch was in non-CFW mode so I knew there was an issue in the CFW software causing this or the new versions of the software in the console or games patching this to not work . Now onto the fix.
So when you go into CFW mode (on my switch using latest atmosphere software when I wrote this 0.12 I think it is) you have the Hekate screen pop up on your switch with your emuMMC options launch , payloads etc following all correct guides I knew it wasn't an issue with files in the SD card when making a emuMMC and emuMMC backups. When you go into payloads and choose fuseeprimary.bin the above issues happen, when you go back to Hekate and choose CFW-emuMMC the above issues happen, when you go back to Hekate and choose stocksysnan or stocksysmmc (note I didn't mention CFW-sysmmc we will get to this option later) this would obviously then run it in non-CFW mode and it'll run off the systems internal memory and though everything would work perfect, it's not what you want as you won't be able to use the edited save files from the SD card it'll be running of internal memory storage so in my case it would start a new game as the save data was in my SD card.
With this I tried all sorts of combinations of using CFW transferring saves via checkpoint and then seeing if it worked in non-CFW mode with the SD card still in but nothing would work it would just start a new story not reading from the SD card save data or when in CFW the local communications wouldn't work.
I accidentally come across the fix (note I deleted all WIFI settings on both consoles so when in either mode I could make sure both consoles were using wireless communication only and it's safer for using a CFW switch I tried this in non-CFW mode and they connect (you DO NOT NEED to be connect to the internet for the Y-commn local communication to connect between the consoles) when in CFW mode I selected CFW-sysmmc from the launch menu instead to start the CFW on the switch then I went into checkpoint to make a backup of my save file and restore it to play that save file in CFW mode it played where I left off from and the modified save had the extra pokemon I transferred via PKHex into my pokemon Box so now I knew the save edit from PkHex worked as well, I came out of the game went to remove the game card to put in pokemon SW instead of the SH I accidentally turned the console completely off and then it lost it's CFW I booted the console back up and kept the SH game in so I booted it up and it started off from my current save that was on my SD card with the PKHex pokemon. I checked all the local wireless communication in Y-commn it connected to my non-CFW switch and they traded and worked perfectly in local communication and that was the fix.
So for some reason to sum it up if you have this issue you can follow this step by step. Turn the switch off completely remove the SD card with the SD card now removed from your switch do whatever you want to the save file on your SD card on your laptop or computer (make backups just in case) after you have done what you need to do put the SD card back into your CFW switch connect your switch to your computer and start the CFW process (RCM method in my case) once on the Hekate menu select "Launch" then select "CFW-sysmmc" then once it's all up and running use checkpoint to backup that save from the SD card then press restore, then check it's playing the correct file with the added save extras you put on it if it is then it's working correctly then exit the game, I also just press restore again in checkpoint after I exit the game to be safe, then turn the switch completely off, but leaving the SD memory card in the console, turn the switch back on now that the switch is in it's legit factory OFW mode so non-CFW then boot up the game and it will be playing the same save file from the SD card with the save file you edited with any extra items pokemon etc you put on it, and now you can connect via local communication to your other switch to trade. DONE.
If you do any changes on the save file when in the non-CFW mode so say for instance you progress in the story further or change pokemon in your boxes etc and want to transfer that save with the changes to the SD card you need to turn the switch off completely and start the CFW process again and launch it in CFW-sysmmc then go to checkpoint press backup and then restore (you can rename the file something to help remember which one it is to locate it easier on the computer). This will now update the SD card with any new changes you made to your saved game if you want to get it from the internal memory storage back onto the SD card.
I know this is long but I really wanted to be as helpful as I could and provide as much information as I could as it took me a long time to sort this out and figure it out, so hopefully this will save someone else a lot of time.
I do not know if this is the way I should have been doing it all along maybe it was but I couldn't find any information anywhere on searching this forum or searching google to confirm this or even somewhere that someone else mentioned doing it this way, as mentioned I kinda found it out by accident but it now works exactly how I want it and I'm really happy with it and how PKHex works.
Thanks to everyone who tried to help me out with this issue and taking there time as well
Disclaimer anyone trying this method the way I mentioned above is at their own risk I do not take responsibility for anything going wrong or damaging their consoles in this process anyway, use at your own risk.