Mac screen flashes when f13 pressed?
Best guess would be …

System Prefs > Accessibility > Audio
You have "Flash the screen when an alert sound occurs" checked.

F13 has no default task - &amp; any invalid key pressed whilst in Finder will generate an alert [doesn't really do it in other apps, but does in Finder]