NiMH batteries work fine in an F5 when they are fully charged, but their nominal voltage is close to the minimum voltage threshold of the camera. The F5 was designed for 8 1.5V batteries. This provides a nominal voltage of 12V. When the voltage from those batteries drops to around 9.8 volts, then the camera will disable itself. The problem with using NiMH or NiCd batteries, is that they have a nominal voltage of only 1.2 volts, so when 8 are used there is 9.6 volts produced. This is right around the minimum threshold voltage for the camera. When these batteries are fully charged they will be at more than 9.6 volts, but the voltage will drop in use. It doesn't take long for the voltage to drop below the minimum threshold for the camera.
Nikon made a rechargeable battery pack for the F5, but that battery pack uses 10 NiCd batteries. 10 batteries at 1.2 volts provides 12volts, so it's the same voltage output as the regular battery pack. Nikon used smaller NiCd batteries so they could fit 10 of them in the battery pack.
AA Lithium batteries (non-rechargeable), should work fine in and F5. They're also significantly lighter than alkaline batteries, and far less prone to leakage. The disadvantage is that they're fairly expensive.
I don't like using alkaline batteries in cameras, since almost all of them are now cheaply made and prone to leakage. If you use them, remove them after use, and never leave them in the camera. The battery holders aren't made any more and finding a replacement usually means finding another camera. They're just not available at a reasonable price.
If you're an avid DIY person, it's fairly easy to add a 9th NiMH battery to the existing battery holder. This will bring the nominal voltage to 10.8V, so it's well above the minimum voltage threshold, and will last a long time. I like this approach, since quality precharged NiMH batteries can have long storage life, and much less likelihood to leak.