I went through the same trouble with my Surface Pro 4 (i5, 8gb). I tried everything people say on all the forums like power cycling, turning typcover port off/on in bios, reattaching, reinstalling windows, reinstalling the whole surface from scratch with the shipped firmware etc etc. The problem always came back till the point when it seemed just like it was dead forever.
MY SOLUTION:
This has worked for me and I cannot guarantee this will work for others but you can try.
Detach TypeCover.
Open up Windows Disk Cleaner. Go to "Clean up System Files" --> Tick the box "Upgrade log files" , "Windows error reports...", "Driver packages", "Old upgrade files", and whatever else you feel is necessary. --> Click OK en wait. --> reboot --> attach TypeCover. --> trusty FN key light should come on and its working again.
There is also a "Windows error reports...", in the standard menu of the Disk Cleanup tool but I'm not sure if that is the same.
SIDENOTE:
This goes without saying but removing windows log files and old updates is not completely without danger so make a backup first.
Also, at the same time I was trying this I also uninstalled almost all HID drivers in the Device Manager (because what the heck), but I don't think this helped because other people have already tried that as well. Your Surface will probably go through an update as soon as you reboot again but that is Ok. It should also install the HID drivers again automatically if you uninstalled them before.
Surface Pro 4 (2015), i5 Skylake 6300U, 8gb, with the 2017 Type Cover