[Redmi Note 10 Pro] Bonoboo:
Note: app compatible with any phone with 1080x2400 screen or lower. Probably higher too, try it. Also it's impossible to make such block when talking in messengers (more precisely, it's difficult). App won't work without gapps, rare case.

Instead of classic reliable optical sensor we have sucky ultrasonic one.

Sometimes it does not turn off the screen while phone call and something is pressed with ear or cheek up to dropping call.

Popular workaround is app "Call Proximity Sensor Fix" which automatically turns off the screen. Or you can press the power button immediately after the answer.

But IMHO this is inconvenient because if you need to look at something on the screen it will not turn on by itself which is so familiar.

My simple application makes screen insensitive to taps. And unlike analogs soft buttons and status bar are blocked too (but not gestures).

On screen will be translucent button that disables lock if you need to use the phone:

– Long tap on button - unlock (button will turn green)

– Short tap when unlocked - lock again

– Long tap when unlocked - remove button at all so as not to interfere with e.g. for entering text

When second call comes in screen will automatically unlock so you can easily answer or hang up. Then it blocks again.

When manually launching the application there will be a question whether to enable 4 seconds delay for an outgoing call. So you able to choose SIM card.

Made by powerful Tasker, the project was exported as standalone application via App Factory. Implemented via scenes with new full-screen blocking type.

Location of button adapted for default AOSP / Google Dialer. It can be misplaced for third-party dialers and / or interface scale. It's impossible to cover all possible variants. So if it really bothers you, install Tasker and project below. Then change coordinates of the buttons.

Installation

Follow manual carefully, otherwise nothing will work.

Application is safe and doesn't have internet access.

1. Download APK below this post

2. Install it via file manager and launch

3. Answer the question about delay, decision can be changed later by launching app again

4. Open Settings > Apps & Notifications > In-Call Screen Lock

5. In "Notifications" turn off them all completely, otherwise they will be annoy you

6. In "Permissions" enable everything: Contacts, Call List and Phone

7. MIUI: right there in application settings enable "Autostart"

8. MIUI: and in "Background" select "No restrictions"

9. Custom: Settings > Apps & Notifications > Advanced > Special app access > Battery optimization > All apps > In-Call Screen Lock > Don't optimize

10. Custom: Settings > Apps & Notifications > Advanced > Special app access > Display over other apps > In-Call Screen Lock > Allow display over other apps

11. MIUI: Settings > Privacy > Management > Special app access > Display over other apps > In-Call Screen Lock > Allow display over other apps

12. Settings > [MIUI: Advanced settings] > Accessibility > In-Call Screen Lock > enable "Use In-Call Screen Lock"

If you using Tasker

1. Download ZIP archive below this post

2. Extract file from it to phone/Tasker/projects

3. Tap on "House" icon at the bottom > Import Project > In-Call_Screen_Lock

4. If you don't need a delay on an outgoing call: delete / disable action #3 ("Wait") from the "In-Call Lock Start" task

5. Custom: Settings > Apps & Notifications > Advanced > Special app access > Display over other apps > Tasker > Allow display over other apps

6. MIUI: Settings > Privacy > Management > Special app access > Display over other apps > Tasker > Allow display over other apps

7. Settings > [MIUI: Advanced settings] > Accessibility > Tasker > enable "Use Tasker"

UPD: files updated, fixed small bug.