But you will have to create the instances of your target class object (plus all of its dependencies) which is going to be really cumbersome.
Consider a Spring service class which uses another redis service and a database service and you want to call a method on this service. So now you have to create the redis service first (copy/paste their config values etc), then the database service and then the actual spring service you want to test.
Once you have created the service, now you need to create the parameter values required by your target method, which you would either create using a new Xyz(), variable.setX, setY and so on, or alternatively now try to import a JSON mapper (ok so now we need to add the classpath to the dependencies as well), and then reconstruct the parameter with objectMapper.readValueAsString("{json here}", Xyz.class);
You can see how this gets unnecessarily complicated depending on the project you are working with.
So with direct invoke you have all the class instances ready in the correct state and you can just call a function. The service classes are being setup by your start up procedure anyways. And for the parameters we are currently using the objectMapper approach so its all setup and ready to use.
I encourage you to give this a try, surely this should be less context switching if you are using intellij as your ide.