I have a bag which is less than the max on height and width but 3cm over in depth. In linear terms I am under the total but my airline are not clear if they are quoting in a linear way.
It's Emirates and it's about carry-on bags; they specify 55cm * 38cm * 20cm. My bag is 54 * 35 * 23. It's a soft bag and not packed full. Route is Toronto to Dubai. I did see on their website reference to a rolling bag which if under the linear measurements could go as cabin bag, but that was the only reference to cabin luggage in a linear context
Each airline has its rules. Given that you specifically compare against the depth than they must have specified a size for each dimension and hence you have to be without that limit. When the linear size is considered, airlines write their rule in terms of linear size.
It is most common to specify a limit per dimension and each dimension must be up to the stated limit. Very few airlines I know of specify in terms of linear size but some do, mostly for personal items, rather than larger ones. So, I suspect your case does not fall within the rules but the only way to verify is to have the airline rules shown.
To enforce limits on cabin luggage, most airlines use a "sizer". It's a sort of open box in which they ask you to put your bag.
You'll see some examples of such sizers in this answer.
Soft bags with contents that can be squeezed or moved are usually not too much of an issue, as long as you are able to fit the bag in the sizer. Beware that when doing so you should also stay within the height allowed, of course.