Hi,
I have tested in my lab and find the computer name is changed successfully. But on Intune portal, it shows error with Remediation failed. The same result as yours. I think this can be a known issue. We suggest to feedback the issue to Intune user voice:
https://microsoftintune.uservoice.com/site/signin