Facing crash issues since upgrade to 2022.3.5f1

Since our upgrade to Unity 2022.3.5f1(LTS at that time), some of our live users are experiencing crash issues(We have not been able to successfully reproduce any crash at our end).

One of such incident report on the Unity dashboard -

Device: Sony/G3412/G3412
OS version: Android OS 8.0.0 / API-26 (48.1.A.2.21/388089107)
CPU: ARM64
GFX: Mali-T880
Unity version: 2022.3.5f1

Native Crash - il2cpp::vm::Exception::PrepareExceptionForThrow(Il2CppException*, MethodInfo*)

Native StackTrace:

Thread 0 (crashed)
0   libil2cpp.so                       0x00000072b93c1c40 il2cpp::vm::Exception::PrepareExceptionForThrow(Il2CppException*, MethodInfo*) 
1   libil2cpp.so                       0x00000072b93c1e58 il2cpp::vm::Exception::Raise(Il2CppException*, MethodInfo*) 
2   libil2cpp.so                       0x00000072b93cb5a4 il2cpp_raise_exception (/Applications/Unity/Hub/Editor/2022.3.5f1/Unity.app/Contents/il2cpp/libil2cpp/il2cpp-api.cpp:561)
3   libunity.so                        0x00000072bbfaf3b0 scripting_raise_exceptionImpl (/home/bokken/build/output/unity/unity/Runtime/ScriptingBackend/Il2Cpp/ScriptingApi_Il2Cpp.cpp:305)
4   libunity.so                        0x00000072bbfbbafc scripting_raise_exception (/home/bokken/build/output/unity/unity/Runtime/Scripting/ScriptingException.cpp:20)
5   libunity.so                        0x00000072bbbb956c UnsafeUtility_CUSTOM_MemSet (/home/bokken/build/output/unity/unity/artifacts/Android/Modules/Android_arm64_nondev_i/Bindings/CoreBindings.gen.cpp:11991)
6   libil2cpp.so                       0x0000000002e12fc0 NativeArray_1__ctor_m981CC7E27B6C9946024877F2696920951443B04F (/Users/hitesh/Work/Unity/2022/OrbootEarth_Android_2022/Library/Bee/artifacts/Android/il2cppOutput/cpp/Unity.InputSystem__5.cpp:5669)
7   libil2cpp.so                       0x00000072bac9bfd0 InputManager_ResetDevice_m3AF149A13F62C9521E68E8AB51E6769E78A5558A (/Users/hitesh/Work/Unity/2022/OrbootEarth_Android_2022/Library/Bee/artifacts/Android/il2cppOutput/cpp/Unity.InputSystem__5.cpp:19936)
8   libil2cpp.so                       0x00000072bac9f864 InputManager_OnFocusChanged_m7ED93DAED3A47BBA508835A5216CB6B3EE7E08F3 (/Users/hitesh/Work/Unity/2022/OrbootEarth_Android_2022/Library/Bee/artifacts/Android/il2cppOutput/cpp/Unity.InputSystem__5.cpp:24531)
9   libil2cpp.so                       0x00000072b94336d0 il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**) 
10  libil2cpp.so                       0x00000072b943361c il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) 
11  libunity.so                        0x00000072bbfaf334 scripting_method_invoke (/home/bokken/build/output/unity/unity/Runtime/ScriptingBackend/Il2Cpp/ScriptingApi_Il2Cpp.cpp:290)
12  libunity.so                        0x00000072bbfbd12c ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) 
13  libunity.so                        0x00000072bc0665b0 Scripting::UnityEngine::ApplicationProxy::InvokeFocusChanged(bool, ScriptingExceptionPtr*) 
14  libunity.so                        0x00000072bbea95fc SetPlayerFocus (/home/bokken/build/output/unity/unity/Runtime/Misc/Player.cpp:276)
15  libunity.so                        0x00000072bc04e40c nativeFocusChanged (/home/bokken/build/output/unity/unity/PlatformDependent/AndroidPlayer/Source/JNI_OnLoad.cpp:140)
16  base.odex                          0x00000072bd180b04 <symbols missing for uuid: 0000000000000000000000000000000000000000> 

From the dashboard the last reported log is this

Type | Timestamp | Frame | Message
Error | Dec 13, 2023, 15:40:42.101 | 2540 | Top level scope allocation is permitted only on the main thread.
And just before that is one of our custom log from OnApplicationPause callback.
This might be related to application going in pause/resume state and some issue with input manager as the stack trace shows nativeFocusChangedand we also see InputManager_OnFocusChanged.

We found one issue tracker for the top level allocation exception issue here
https://issuetracker.unity3d.com/issues/top-level-scope-allocation-is-permitted-only-on-the-main-thread-dot-error-thrown-when-using-allocator-dot-temp
This seems to be fixed in 2022.3.9f1 so we are thinking of doing an upgrade later in the next year if we don’t get any solution and try to see if the crash continues.

Anyone else faced such crash issues or know what might be going on.

In general it is good practice to update your Unity version every now and then. Between the same LTS there wont be any breaking changes.
It seems that the fix is ready. Updating the input system also might help