The problem is that sql developer is using sql java which u can see in sql developer by going to help -> About -> properties and search java.home
Now we need to use our own java version here and to set that we have to got to C/users/<username>/AppData/Roaming/sqldeveloper/<product_version>/ product.conf file here u can clear the complete file and set this
SetJavaHome <path>
Fyi- path will be till jdk version (C:/....../openjdk21.0.4) till this now restart your sql developer problem will be solved. To check that go to help-> ... steps mentioned above.