Trump and Hegseth talking about the canal made me google the largest military ships to transit:
The widest ships to transit are the four battleships of both the South Dakota class and Iowa class battleships, which have a maximum beam of 32.97 m (108 ft 2 in), leaving less than 15 cm (6 in) margin of error between the ships and the walls of the locks.
This is the USS Missouri, one of the Iowa-class battleships as she passes through the Miraflores Locks of the Panama Canal in October 1945
https://en.wikipedia.org/wiki/Panamax?wprov=sfti1#Ship_dimensions