Strange asserts since upgrading to Unity 6

After updating to Unity 6 I randomly have these strange asserts coming from Unity:
Attempting to upload graphics texture in invalid state.
Gfx Device Resource has already been registered
Failed to insert tex to TexIDMap

If anybody has any information about these asserts it would greatly help me.

These asserts seem to be harmless as I do not see any visible problem when executing the project, neither in the editor or in standalone.
Yet, they are quite frightening and completely new to me (after several years working on that project).

I have been using Unity 2021.2.3 for years and had no problems, and before that I used numerous Unity versions with the same code to load the textures since 2017 and I never had these assert before.
I updated to Unity 6.0.17 and now I have these random asserts.

It can happen while calling ‘AssetBundle.LoadAllAssets()’, or while calling ‘Texture2D.Compress()’, or ‘QualitySettings.SetQualityLevel()’.

Sometimes it happens without any stacktrace from my own code, the only stacktrace being:
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

And sometimes it happens with absolutely no stacktrace, nothing, in that case it is always this assert:
Gfx Device Resource has already been registered
In that case it always comes from a thread which is not the main thread (and not one I use, I have more than 3500 logs during the loading sequence and none have that thread Id).
I suspect that it is the Unity graphics thread which would probably explain why there’s no stacktrace.

I already tried to close / restart Unity, to delete the Library directory and to start from scratch with the data in my repo (only ‘Assets’, ‘Packages’ and ‘ProjectSettings’).
I also tried Unity 2022.3.20 and it works perfectly, no assert in 10 startings while I have the assert all the time with Unity 6.

Also, note that I had no assert with Unity 6 the first 2-3 times I launched the project in Unity.
But when I had them for the first time it’s started to be every launch.

I finally found the root of the problem.
I was loading textures using ‘UnityWebRequestTexture.GetTexture()’ and ‘DownloadHandlerTexture.GetContent()’.

In Unity 2022 and later it adds mipmap to the texture which cause all sorts of trouble apparently.
That’s specifically causing that assert:
Attempting to upload graphics texture in invalid state.

I don’t know why it was doing it a bit at a random.
I don’t know why I also had the 2 other asserts.

But now that I have fixed it using that simple fix it works perfectly:

RAW_TEXTURE_LOADING_PARAMS = DownloadedTextureParams.Default;
RAW_TEXTURE_LOADING_PARAMS.mipmapChain = false;
UnityWebRequestTexture.GetTexture("file://" + FullPath, RAW_TEXTURE_LOADING_PARAMS))