File Access Error when Using Take Screenshot Activity in StudioX

Take Screenshot Activity in StudioX Error Log: "Take Screenshot 'IMG imageID': Failed to save the image to the indicated file path 'D:\XXXX.png'. Please ensure that the path is valid and that the process has write access for the given folder."

Issue Description:

The issue happens only when the Auto Increment is set as None (overwrite).

Solution:

Add Invoke Method with Method Name: Dispose before Take Screenshot Activity to make sure the image is released.