Exactly. There's literally classes of ships that are something "max". e.g. Panamax. Panamax ships are literally built to the absolute limit of what will fit through the locks at the Panama Canal. And yes, sometimes the locks get bigger, and the ships follow.