The Fn key isn't "capturable" -- you can't use it in a trigger, can't use it in a "key is down" text, and so on*.
But you can use other modifiers with your number -- say, ⌃⌘1 for F1 -- and have the macro simulate the keystroke. You won't able set the action's keystroke by typing in the usual way, of course, but there's a drop-down to the right of the box that will let you set a function key.
* OK, you might be able to test if it is down with some ObjC or Swift scripting, but it doesn't register as a modifier so you'll be capturing every number key you press and will have to process then "insert by typing" if Fn isn't down, and the odds are that things will be typed out of order as the event queue gets messed about...
Fn is not a modifier, what Nige_S advises is certainly the easiest thing you can do.
If you absolutely want to use fn, then change Fn to right control in macos. With KM you can then create macros that only work with right control (fn) + 1. The other control key remains what it was. So, left control + 1 triggers something else.
Perhaps it is even easier to use short/long press. Short press 1 = 1. long press 1 = F1
The situation is different with BTT. fn can be used as a normal modifier. fn + 1 therefore works without any problems.