Hi,
I'm having the exact same issue on windows 11.
Windows decided to deactivate itself after some hardware changes (I did not replace the motherboard, I only installed extra RAM and reset BIOS settings a few times).
As to how I obtained my digital license, I bought a windows 7 home premium retail key many years ago which got converted into a windows 10 digital license that was linked to my microsoft account, then it got converted to a windows 11 digital license when I upgraded from windows 10 to 11 by reinstalling windows from scratch.
I followed the steps you outlined in your solution, however I'm not sure where to obtain the <kmskey> value (the product key), because as far as I'm aware, a product key does not exist if I have a digital license. Also kms is only relevant for windows enterprise edition with volume licensing. Not sure how this is relevant for home edition?
Please advise, thanks.