I think toggling Active Windows stops Teams going inactive.
I was using 13 macros all day for an automating task. I needed a macro to record the macro uses and Cummulative time savings. I created Macro L (on LinkedIn) in Excel which records every active window change. This was very surprising regarding burnout levels of work and mental load. I was accessing 2,500 Active windows in standard work day 7.3 hours.
It is a bit silly to try to appear always working at 100% It is important to take regular breaks. My Macro L will show logged off time for mid am/pm breaks and lunch if >=30min. You will be more productive with regular breaks, and the Macro L can prove this.
Most employers even if not explicit policy are probably using Internet browsing logs, key logging activity rather than the actual key strokes as this infringes privacy. It looks suspect if you are programming a mouse or key movement every few minutes without changing active windows.
Even when working on a document it is reasonable to work on one for a long time without changing focus.
All the effort to appear to be working, should be spent on working, or regular tech breaks. Trying to pin down line managers on break frequency and length is difficult. I think 10-15 mins mid am/pm is good to have a stretch if WFH and switch off. More productive at the start and end of a break rather than having fewer start stops.
I am working on a MsgBox to prompt me every 25 mins if I want to take a drink/WC/stretch break.If yes the MsgBox counts down on Minutes passed until the 5th minute to get back to work.This will be WFH Macro M (for Move). The Timer loop is reset to zero when you lock screen for a mid am/pm break or lunch.