142mm is the standard dropout spacing for 12mm thru axles, and any hubs I'm aware of that are made to this standard with Shimano compatible freehub body will accept a road cassette.
Note that there is now something called the Boost standard which has 148mm dropout spacing, but so far, that is only found on mountain bikes.