Can’t comment on PC usage as I am only familiar with Xbox.
This is a well known problem:
https://www.reddit.com/r/XboxSeriesX/comments/r77s0f/i_wish_there_was_a_way_to_turn_off_auto_idlepause/