Java is adopting a lot of C# features, with varying success[1]. As such, more developers are seeing the advantages of those features so why not just use C# where it is way more refined. The cross-platform story is pretty complete. The runtime and the tooling. VS Code works. IntelliJ fans have Rider. The dotnet command tool does the things you need it to.
Some things in Java are just clunky. Building and package management can really become a nightmare. You have choices where you don't really want them.
Microsoft is doing a better job stewarding the platform than Oracle, and as unpopular as Microsoft can be, it is nothing compared to the ill will that Oracle has brought. Microsoft has unhappy customers; Oracle has paying prisoners. The main challenge Microsoft has to overcome is the older versions of the platform itself. As an example, some developers think Entity Framework only works with SQL Server. That was never the case. EF Core works swimmingly with a lot of databases, with Postgres support becoming a notable highlight.
[1] Choices like type-erasure for generics, not having auto boxing and unboxing really makes for some clunky APIs. You have things like
C# has
IEnumerable<T> Select(...)
where T can be int, string, whatever. Async and await alongside IO libraries that are non-blocking by default is another win. Sure, function coloring, but it's been a feature for ten years and it just works.