Changing motherboards when you're using Windows 10 does NOT work "every time", as has already been stated here, however, it will USUALLY work fine if you are switching from one board to another that has the exact same chipset, BUT, even then, "every time" can't be claimed either because in some cases there are significant enough differences between various integrated components like the secondary storage controllers to cause problems. I'd certainly try it first, just to see, if the boards are from the same chipset family like those are, but I would not be unexpectedly surprised to find there are issues.
Just today I spend a half day trying to figure out what the heck the problem was on an installation where I replaced a board with the exact same board and it would go into the BIOS perfectly fine, time after time, but the second it tried to boot Windows, it would get one single dot of the circle and bluescreen, every time. I thought for sure it was a memory issue since I had changed out the 8GB memory kit for a 16GB kit while I was changing out the board but after hours of trying to tweak the memory configuration, and even going back to the original memory didn't change anything, I did a clean install and "poof", fixed. So, try, but be aware.
Anytime you make any major change, even when it might not technically really even qualify as a "change", you may have to reinstall. And then I've also seen a Windows 10 installation that had been around for years, work perfectly fine after going from Haswell to Ryzen 3000 series. Ended up doing a clean install on that too, just because it had been around for so long, but it was working fine when I whacked the installation just to play it safe.