If pilots couldn’t train under the VWP then Flight safety and CAE would lose over 50% of their business.
It’s USCIS that lets you in the country, and TSA that allows a foreign person to train. It’s really as simple as that.
It’s not upto the flight school to determine a students alien status in the country. If a student doesn’t have a valid means to be in the country then the TSA won’t approve the training.