I had a similar problem a long time ago, I'm not sure, but some of the following solved my problem.
-First of all, you can close your antivirus program and try, if the problem is resolved, add the Lazarus exe path and the project path you are using to the exclusions.
-Run Lazarus with Administrator Rights. Make this feature permanent in the compatibility settings.
-Stop the Windows file scanning and indexing service.
If I remember anything else, I'll add it here.
