Dell XPS 15 Fn key stopped working

Solution 1:

From your description and the fact that an external keyboard works fine, you need to replace the keyboard. These are normally a field replaceable unit and do not require soldering.

You can get one from Dell Parts or you might even try eBay as things like this are commonly available that way. I have purchased replacement screens on eBay and prices are usually reasonable.

Solution 2:

An ideal solution would be replacing the keyboard. That way, you wouldn't need to rely on third-party remapping software and you'd be able to use all the keys on the keyboard as they're meant to be used. Here's a video of a keyboard replacement for your model. It looks quite complicated for just replacing the keyboard.

If you'd rather go the software "band-aid" route, try looking at AutoHotKey. It is possible to remap keys using that. It's really up to you whether you want to spend the time and money replacing the keyboard. If it were me, I'd try to make do with the software solution.