In my case, the image is sysprepped, and the autounattend.xml has the entry <ComputerName>@compName</ComputerName>
This means that the computername as known in the console is substituted on build.
So for rebuilds, the name will stay the same.
For new builds, I run a script, that updates the name in the database before deploying the image, unsupported, as it updates the database tables directly.
Phil