To use pathfinding, there are a couple of options in Godot I have experimented with, you can use navmeshes, or AStar. There is an example navmesh project available from Godot, and miziziz did a good tutorial on using gridmaps to create an AStar grid.
It's a couple of years old now, but should still work, I got it to work a few months back when I was experimenting with an RTS build, you can enable/disable points in runtime, and setup is easy using gridmaps.
In order to move when the mouse is down, but without changing the location every frame, I would split the code into 2 parts, using Input.isactionjustpressed(LMB) to create a new "go to" point and do the path calculation, this could be in an input function instead of a process function. Then to have the character move while the mouse button is held, use Input.isaction_pressed(LMB) and call to update the movement along the path.
The main problem I can see here, is if you accidentally release LMB, and change the target point when clicking again, it may be easier to use a different button for setting a location and moving along the path. Or if you mean you would like to be able to hold the LMB while moving the mouse onscreen and have the character follow it, which would require constant recalculating of paths (if using pathfinding). This could be overcome to a degree using timers to limit the number of times it calculates paths per second.
It's been a while since I've worked on anything like this, but I will try and modify the demo project linked above to include an example of what I mean.