Unsure what camera you are using but if it only has autofocus, you can focus lock it by focusing on something of similar distance away (example beside the tank) and then pressing the shutter halfway down. This locks the focus and you can swing back to the fish to take the photo.
I can see the nets in the background are sharp so perhaps try the focus lock trick or change to center focus (your camera may be set to multi zone focus).
Practice makes perfect so get ready and well prepared before the next spawn