Julia doesn’t listen to mouse clicks,* so this seems just well an apparent random pause/slowness in your Julia program, and it would have continued without you doing anything. I suspect something like an anti-virus program interfering, especially on Windows, maybe something built-in. Your *own Julia program can listen to the mouse (even in the terminal, on Linux, Windows and macOS, I wasn’t sure possible, I confirmed in Python with “from pynput import mouse”), but if so you could or should know if it did.
There are some exceptions, like in Linux middle clicking might paste text, so it would look like input from the keyboard. Julia would also ignore such for your program, except maybe CTRL-C, unless your program were expecting input.
*
I’m pretty sure about this, there’s no good reason for Julia or other languages, such as C++ (it neither has any mouse support in its standard library, nor seemingly Python), to do it (Visual Basic might be an exception), by default. I even checked the source code for Julia for “mouse” and I only found emoji/mouse false-alarms:
"\\:mouse:" => "🐭",
"\\:mouse_trap:" => "🪤",
FYI: If you DO want to listen to a mouse, there’s seemingly some Julia code available (or you could call Python with the the above mentioned library), so if you suspect your code doing that, you can look up if relevant Julia (or e.g. Python) packages used: