See Tesla Model Y Owner's Manual, Page 13 -
https://www.tesla.com/sites/default/files/model_y_owners_manual_north_america_en.pdf
Calibrating Windows
In the unlikely event that a window behaves
unexpectedly (touches the bright molding, fails to open
or close properly, goes down more than normal when
the door opens, etc.), you can calibrate it to potentially
fix the issue.
To calibrate a window:
1. Close the door with the affected window.
2. Sit in the driver's seat and close the driver door.
3. Using the window's switch on the driver's door, raise
the affected window until it stalls.
4. Using the window's switch on the driver's door, lower
the affected window until it stalls.
5. Repeat step 3 and raise the affected window until it
stalls.
The window should now be calibrated. If the issue
continues after attempting the calibration procedure a
couple times, contact Tesla