Tailing logs

Trying to using the Start-ProcessWithLogTail function but the output is just

Get-Content: The process cannot access the file 'C:\WINDOWS\TEMP\ImmyTemp-20250602-152644\MCPR\mccleanup.log' because it is being used by another process.

over and over again. Any ideas on how to get this to work?