I just bought a whole new pc because i had this exact same issue. Thread starvation warning in console and SteamNetworkingSockets lock held. Now even on gtx 3080 and ryzen 7 5800x so even while im on a fresh installed windows and dota2 all drivers updated and allocated on a fresh ssd, the same just started to happend after some games. I just simply cant wrap it around being pc related since im on a 3k new pc and i even bought a new router.
Source: https://www.reddit.com/r/DotA2/comments/t6020p/new_3k_pc_and_got_same_identical_lagspikes_and/