Let's look at a "hypothetical" scenario:
Country blue has a fleet size of 100 units and country red has a fleet size of 40 units.
Country blue has the shipyard capacity to build 5 units a year and country red has the shipyard capacity to build 50 units a year.
Would it make sense for country blue's navy proponents to demand an increase in the fleet size to 120 units in order to cope with the challenge that country red is capable of?
I suppose it's not sensible at all. It's a wasteful and losing proposition.
An alternative would be to approach the issue diplomatically;
A naval treaty might be negotiated that limits both countries to a fleet size of 80.
Both countries would be served well by this, and it would be a win-win treaty. Country blue can reduce its spending by approx. 20% (>33% compared to the plan to increase to 120), while country red would be recognised as equal in naval affairs and could achieve fleet parity with much less spending at an earlier date.
A similar treaty existed a century ago, the Washington Naval Treaty. It lasted for 14 years until it was washed away - as so much else - by a wave of jingoism and hostilities.
The limitation on actual warship hulls would go counter to the intuitive pursuit of self-interest by the navies, but it would motivate them to find ways around the limitations. One of these ways could be a containerised, modular system to turn freighters into auxiliary warships - armed merchantmen - within weeks. Convoys of freighters and armed merchantmen could become capable of self defence against missile attacks, submarines within heavyweight torpedo range and against surface and some aerial threats. Meanwhile, the official and permanent warship fleet could be focused on submarines (SSI preferably), ships with huge (BMD) radars and - if this is for some reason advisable - CTOL aircraft carriers. The naval air service could include a surplus of AEW and ASW helicopters officially meant for coatal protection and really meant for the armed merchantmen.
Such a country blue navy might also be motivated to invest much in the development of drones (underwater, surface and aerial). Ship hulls become the less important the more the military functions are transferred from the platforms to drones, offering a way to mitigate the importance of the shipyard inferiority.
Navies that seek more ship hulls would intuitively hate such a concept, but navies that had the pursuit of more ship hulls blocked by a binding treaty might embrace such a concept. Well, unless the navy is as powerful as the IJN was and pushes the government to leave the treaty.
There are downsides for country blue, of course.
- country red would reach parity sooner
- country red would have an on average newer (more modern) fleet when it reaches parity
- country red could still leave the treaty and commence a naval arms race, which it is bound to win
The treaty strategy would thus not be perfect for country blue, but the status quo ante of country blue isn't perfect anyway, unless it somehow finds a way to catch up in regard to shipbuilding capacity. The treaty might in fact be a huge improvement, even if it wouldn't last long.