I had a similar problem but not exactly this. You can try to change the API compatibility level under Project Settings > Player.
While searching for the solution, I found that people were switching to.Net2, but mine was .Net2 by default, so I switched to .Net 4.x and it builds successfully.
Answer from Akash Saxena on Stack OverflowUnity 6 Upgrade: Invalid AABB inAABB UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) - Unity Engine - Unity Discussions
BUG" Assertion failed UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Build completed with a result of 'failed' in 2 seconds (2002 ms) building player failed unityengine.guiutility:processevent (int,intptr,bool&)
I had a similar problem but not exactly this. You can try to change the API compatibility level under Project Settings > Player.
While searching for the solution, I found that people were switching to.Net2, but mine was .Net2 by default, so I switched to .Net 4.x and it builds successfully.
Changing the Build System from Gradle to Internal fixed the problem for me. See the snapshot below.

Unity 2022.2.18
Full warning text:
There are 2 settings providers with the same name Preferences/Jobs in User scope.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
This warning pops up whenever domain reload happens (it seems like). Googling doesn't give me any clue what all this means. Starting from full warning text itself, and ending with what in the world Preferences/Jobs is and where it lives, and what on Earth User scope is and where it lives.
Judging by the word Preferences, I thought that issue is with my user preferences / Editor installation. But it appears only in 1 specific project. And in project folder I haven't found anything that would even remotely be related to something like "Preferences/Jobs".
When it started popping up I don't know either, I noticed it when I had my console completely spammed out by it.
I already reported a bug. I also asked in official discord server with no meaningful replies whatsoever. By chance, does anybody have any clue at least what this issue means? At least perhaps what is Preferences/Jobs and where it is on my SSD.
Edit: I blindly tried to rebuild Library folder (by just erasing it). Warning still pops up.
Edit2: The warning message with full stack trace (probably should have included it originally), no idea how to make any sense of it:
There are 2 settings providers with the same name Preferences/Jobs in User scope.
0x00007ff627fbc69d (Unity) StackWalker::GetCurrentCallstack
0x00007ff627fc1649 (Unity) StackWalker::ShowCallstack
0x00007ff628f8f701 (Unity) GetStacktrace
0x00007ff629651892 (Unity) DebugStringToFile
0x00007ff627025e26 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000000054a2df93 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x0000000054a2decb (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x0000000054a2dc60 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000000054a2db23 (Mono JIT Code) UnityEngine.Debug:LogWarning (object)
0x00000000533dd01b (Mono JIT Code) UnityEditor.SettingsService/<FilterAndWarnAgainstDuplicates>d__7:MoveNext ()
0x000000004a07b7e0 (Mono JIT Code) System.Collections.Generic.LargeArrayBuilder`1<T_REF>:AddRange (System.Collections.Generic.IEnumerable`1<T_REF>)
0x000000004a31fbfb (Mono JIT Code) System.Collections.Generic.EnumerableHelpers:ToArray<T_REF> (System.Collections.Generic.IEnumerable`1<T_REF>)
0x000000004a3196f3 (Mono JIT Code) System.Linq.Enumerable:ToArray<TSource_REF> (System.Collections.Generic.IEnumerable`1<TSource_REF>)
0x00000000533db8d3 (Mono JIT Code) UnityEditor.SettingsService:FetchSettingsProviders (UnityEditor.SettingsScope)
0x00000000533db373 (Mono JIT Code) UnityEditor.SettingsWindow:Init ()
0x00000000533dac7b (Mono JIT Code) UnityEditor.SettingsWindow:InitProviders ()
0x00000000533da5c3 (Mono JIT Code) UnityEditor.SettingsWindow:DrawTreeView ()
0x000000004a94d83f (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x00000000533a20d3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x000000005335f91b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()
0x000000005335def4 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)
0x000000005335c75b (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeSlice`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeSlice`1<UnityEngine.Vector4>,UnityEngine.MaterialPropertyBlock,bool,System.Exception&)
0x0000000053359513 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChain:Render ()
0x000000004a9d1c53 (Mono JIT Code) UnityEngine.UIElements.UIRRepaintUpdater:Update ()
0x000000004a32459a (Mono JIT Code) UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
0x000000004a90c6ab (Mono JIT Code) UnityEngine.UIElements.Panel:UpdateForRepaint ()
0x000000004a90b203 (Mono JIT Code) UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
0x000000004a90a30a (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x000000004a909fcb (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x000000004a909def (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x000000004a909d2b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x000000004a909b73 (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x000000004a909c36 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ffd00130394 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffd0006eb44 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
0x00007ffd0006ecdc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
0x00007ff627ee3fa4 (Unity) scripting_method_invoke
0x00007ff627ec4a14 (Unity) ScriptingInvocation::Invoke
0x00007ff627ebf665 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff628007c7a (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff6289e5e48 (Unity) GUIView::ProcessRetainedMode
0x00007ff628fc2144 (Unity) GUIView::OnInputEvent
0x00007ff6289e5d93 (Unity) GUIView::ProcessInputEventFromAPI
0x00007ff6289e5c68 (Unity) GUIView::ProcessInputEvent
0x00007ff628fbb07c (Unity) GUIView::DoPaint
0x00007ff628fc402c (Unity) GUIView::RepaintViews
0x00007ff628afe66e (Unity) PlayerLoopController::InternalUpdateScene
0x00007ff628b0b11d (Unity) PlayerLoopController::UpdateSceneIfNeededFromMainLoop
0x00007ff628b09421 (Unity) Application::TickTimer
0x00007ff628f95ffa (Unity) MainMessageLoop
0x00007ff628f9ada0 (Unity) WinMain
0x00007ff62a37fbae (Unity) __scrt_common_main_seh
0x00007ffd58a426ad (KERNEL32) BaseThreadInitThunk
0x00007ffd59e4a9f8 (ntdll) RtlUserThreadStart
I tried to build a development build to android and at once it gives this error:
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I was building a lot of times before that and now this happens