This method (.NET) could solve the problems with mouse block. It's easy to use, just need to add the DLL to your project.
Documentation | Method
using InputInjectorNet;
using System;
using System.Threading;
//Author: Grizzly222
namespace InputInjectorExample {
class Program {...