It is a known problem with the ranger.
The Window actuator gets old and window falls forward creating a gap that make the window whistle, especially after installing Ford Rain Guards(because it sitting inside of window channel).
Roll window most the way up, then grab the window and tilt it back toward the back of the truck.
Hold window while raising it up the rest the way.
You can get new aftermarket actuators from Tony with 1aauto here.