Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
We know you were able to previously use NuGet type packages in this manner but this is not an official supported feature of Unity. Recently we made some changes that resulted in us requiring System.Text.Json for some upcoming features. However, we cannot support the co-existence of two versions of the same package and need to stay complient with our version of .Net (version 8) which is why your added version 10 of System.Text.Json get's automatically invalidated.
I am sorry, but we unfortunately cannot fix this as this is the intentional behaviour.