https://social.technet.microsoft.com/Forums/ie/en-US/275dd263-8b88-498f-901f-43e9b05a4cb2/f12-developer-tools
12 Developer Tools could be disabled with group policy.
Since you are using Windows 10 home edition, we may consider change the following registry to disable F12 Developer Tools under Internet Exploer 11:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IEDevTools
On the right pane, create a REG_DWORD 32 bit value "Disabled", and set the value to "0x00000001".
Then you would find the F12 developer tools is not listed under the Internet Settings list, and F12 is not function;
To disable F12 Tools under Microsoft Edge, open regedit.exe and navigate to the following path:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\F12 (If no such archive, create one)
On the right pane, add a REG_DWORD 32 bit value called "AllowDeveloperTools", set the value to "0x00000000"
This disables the F12 tools under Microsoft Edge.