I generally just go for the appropriate cockpit length on either bike - Top tube + stem. I tend to like a little shorter for racing as the bike is a bit more agile and has a shorter wheelbase. Helps prevent me from locking my elbows too. But its all personal - ride what feels comfortable.
For long distance gravel racing - I like larger, for shorter CX races I like smaller.