If the server is a Domain Controller, demote it first. You cannot switch editions on an active DC.
Converting a Windows Server 2022 Evaluation edition to the full Standard version is a common task for admins who have finished their proof-of-concept and are ready to go live. You don't need to reinstall the OS; you just need a few DISM commands. Prerequisites Before Starting convert server 2022 eval to standard