This may be apocryphal, but I read something about someone having a carryon case that complied, allegedly, with the dimensions published, then it was discovered that the case wouldn’t fit into the measurement frame. Turned out the checkin staff lined the frame to make it slightly too small to force people to pay for hold storage… 🤔
It’s certainly the sort of stuff some airlines would do to make more money from the passengers. Might be worth checking online with all the airlines likely to be used for their carryon luggage dimensions and aggregating them to avoid fit issues, the smallest in each dimension for example.