Well the good news is that Sony Mobile is now promising that a future update will fix the issue, although no timing has been confirmed. You can check out the quote below from one of the official Sony support folk below. We’ll let you know once it starts rolling.
Sony promises a fix for Xperia X Performance owners
“I’d like to say thanks to everyone who send us logs of this and again apologize for any inconvenience this is causing. I’ve just received information that a new software update will be available shortly with a solution for this. Until the new software update is available, if the accelerometer, gyroscope, magnetometer, ambient light, proximity sensor, barometer or screen rotation stops responding, please try to restart the phone as a workaround.”