According to this thread from Gateway, this would be acceptable.
https://vexforum.com/t/answered-sensor-casing/19756/1
I am wondering if drilling holes in the physical housing of a sensor, avoiding all electronic systems inside it would be acceptable for helping mount the sensor.
I am asking now, simply to get an updated answer for this season.
Yes, this is legal in VEX U.