On higher-end laser printers, the printer is smart enough to know what size paper you’ve just loaded into the tray. And the real smart printers won’t try to print from the tray.
“How do you know this?”, asked the customer.
‘Oh, just experience.’
The longer answer is that I remember fixing printers when they weren’t so smart. Printers which would try and grab 20 pages from a misadjusted paper tray. Invariably leading to an expensive repair.