NOT TRUE ... as long as all four tires are identical (same brand, model, and size) and the measured circumference of all four tires is within 1/4 inch (or measured tread depth within 1.3/32 inch). It should go without saying not to mix summer and winter tires (i.e. on the same car at the same time); it has to be one or the other.
FWIW, both 225/50R18 and 225/55R17 were OE tire sizes for MY 2015-2019 Legacys, depending on vehicle trim level. The 17 and 18 inch wheels and tires are interchangeable, as long as all four match. If in doubt, consult the Owners Manual.