Hello Wei,
As per documentation there is a restriction to Windows server OD only:
Configure VMs to run interactive tests (Windows Server OS Only) - Windows agents can either be configured to run unelevated with autologon and with interactive UI, or they can be configured to run with elevated permissions.
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/scale-set-agents?view=azure-devops
Let me know if you have any additional question or clarification .
Luis