I tried both windows and Linux, and I got the same error in both:
az image create --name MyVMIMage --source MyUbuntuVM
(OperationNotAllowed) Creation of managed images are not supported for virtual machine with TrustedLaunch security type.
Code: OperationNotAllowed
Message: Creation of managed images are not supported for virtual machine with TrustedLaunch security type.