The third and fourth generation iPad Pro 12.9" have identical external physical dimensions. The fifth generation iPad Pro 12.9" is thicker.

Where these models fundamentally differ is the rear camera array, the third generation (and later) having a much larger "bump" that must be accommodated by a fitted case.

As such, given the identical physical dimensions of the third and fourth generation iPad Pro 12.9, a fitted case designed for a fourth generation iPad Pro 12.9 will have a larger rear aperture to accommodate the larger camera array - and will also accommodate the smaller camera system of the third generation iPad Pro 12.9".
By contrast, a fitted case explicitly designed for the third generation iPad Pro is likely to have a rear aperture that is too small to accommodate the much larger "bump" of the fourth generation iPad Pro - and will therefore be physically incompatible with the later model iPad.
In summary, you must verify precisely which model(s) or iPad the case is specifically designed to accommodate. The manufacturers own website should provide this information. If marketed by Apple, the associated product page will explicitly state which iPad models the case will fit.