Looks like MS Teams does not provide a way to set duration for showing away as described in https://superuser.com/a/1621012/849717. How to create a batch script to periodically move mouse, say a couple of pixels away and back to original position, so it will prevent MS Teams from showing status away?
move mouse powershell
in your favorite search engine and click the first link. Invoke the script through scheduled tasks, or have it constantly running in the background. Or use an approach as described here addictivetips.com/web-conferencing/microsoft-teams-away-status