Sorry to hear that, about your discomfort experience with your Samsung Galaxy A31 and Samsung Galaxy A32 having issues with sensor/touch and orientation mode and we apologize for the inconvenience it caused to you.
Self-Diagnostic check on the Samsung Members app.
Check the status of your device with the Samsung Members app Diagnostic tool. You can select the individual categories you would like to diagnose or run a complete diagnostic check. After the diagnostic is completed, you can select the corresponding icon to see the results and status of your device. Follow the steps below to start your diagnostic check.
Step 1. Run Samsung Members and select Get help on the lower half of the screen.
Step 2. Tap View tests located under Diagnostics.
Step 3. If you would like to run through all of the Diagnostics checks, tap Test all. Otherwise, tap only "Touch screen".
Step 4. Your Galaxy phone will then run through the checks.
Step 5. Follow the on-screen instructions to complete the check.
Step 6. When necessary, you may need to manually run or interact with the corresponding function.
Also, you can submit an error report through Samsung Members app as follows:
Step 1. Long press Samsung Members icon on Apps screen and tap Error reports.
Step 2. Tap OK on agreement popup to send system log data.
Step 3. Select Symptom category "Sensor/Touch" and "Settings/System".
Step 4. Describe the problem in details and SEND.
If the problem persists, immediately bring your device to the nearest Samsung Authorized Service Center. Rest assured that our Samsung Engineers/Technicians are competent to assess your device and offer solutions to restore it up to optimum performance.
For more assistance, you may contact us on our online Samsung support channels below.