How to connect MacBook Pro to an iMac with a 3rd party keyboard?
Technically speaking, you're not pressing F2 (yes, it's labeled "F2), you're actually pressing "Brightness Up."  To actually get the "F2", you have to press fnF2

You can confirm with with a utility called xev which will display the scan codes of what you're typing.  The actual "F2" comes up as scan code 128 and will do so on both your Apple (when pressing the fn) and Dell keyboards.

Since you've already tried turning off "use all F1, F2, etc. keys as standard functions keys", your keyboard doesn't support this.  You most likely need an Apple keyboard or at minimum, a keyboard with "enhanced" function keys; with a fn to change the function.