This is a really old idea. It was implemented in CS:GO in ~2015 [0], although community anti-cheats like SMAC have implemented it for years before then [1]. Riot have an article about their implementation of the same idea in VALORANT's that a good read from a technical perspective [2].