I believe it will be the shutter speed if it's sitting at 1/40, the TG-5 has no manual mode so it bottoms out at a shutter speed which varies with focal length if flash is used. The tell tale on the barrier reef anemone fish is the rear stripe , you can see a ghost image of the stripe sitting above the fish - the ghost image is a blurred ambient light image and the flash exposure is sharp due to its short duration. There are three possibilities at address this :
Shoot wide and at f2 and that would get you up around 1/500 and get right in close. or 1/250 and f2.8
Set exp compensation at -2 this will cause shutter speed to be two stops higher at around 1/160
Set maximum aperture this would be between f8 and f18 and dial up the flash - the shutter speed will bottom out .
All of these aim to decrease ambient exposure so are only applicable when you are shooting 100% flash on the subject - open water BG will be quite dark - not a balanced exposure.
The TG-5 has only 3 apertures - when wide open it has f2 or f2.8 and then f8 is achieved with an ND filter it reduces ambient and flash by 3 stops but because the shutter speed has a minimum it won't drop below ( I think it's 1/30 at min zoom) ambient light will be about 2.7 stops under exposed. At max zoom it's f4.9, 6.3 and f18. The table below shows how the aperture changes as you zoom.
View attachment 621685
When I say it's the shutter speed it is going to be due to subject motion - anemone fish are constantly on the move - it won't happen on every frame. You can see the ghost image on the first anemone fish - mainly the stripes as they are very reflective but you can also see a faint ghost of the fins above each fin.