This is a fabric minecraft mod that enables a hidden command in 1.18 experimental snapshot 6 and 7, the mod also backports the client feature to older versions. Chase is showcased by a Minecraft developer in this tweet.
Fabric. No fabric api required Works in 1.18 snapshots and in some 1.18 experimental snapshots
I recommend turning /gamerule sendCommandFeedback to false and turning Pause on lost focus off with F3 + P