In theory yes, but an in-place upgrade is risky and never recommended. Better option is to export the virtual machines / copy off to removable, rebuild host, patch fully, add hyper-v role, import virtual machines.
--please don't forget to upvote
and Accept as answer
if the reply is helpful--