Welp, I only see two scenarios this may be happening in my oh so humble opinion.
1. You have a trojan that is making your computer press f12 at random times.
2. You need to click View on your Steam Library then Settings. Choose In-Game tab. Now click on the x right next to the screenshot manager key to unassigned any key to it