I have successfully been able to replicate this bug. It does seem to be dependent on the aquarium being resized. The starfish don't seem to register the new aquarium size and only follow the original size. placed.
The only work around I have found is to delete the aquarium completely and rebuild it without adjusting the size. I did this by saving the aquarium as a template so I could just place it directly back down and this seemed to resolve the issue.
After increasing the size of a tropical fish aquarium, the starfish that I had in the aquarium now move inappropriately (see screenshot). The starfish will start to move outside of the aquarium. Once they reach so far out, they teleport to the door/entrance of the aquarium and then keep moving sideways in a line, each time drifting out of the aquarium then teleporting back to the door. In the screenshot, I circled two starfish. One can be seen outside the aquarium (moving to the right) and the other just finished teleporting back to the left side (entering through the door). Other starfish will eventually also drift out of the aquarium (in different locations, not just the area shown in the screenshot. Those starfish then also teleport to the entrance, and then keep moving in a line until they all eventually end up in the same line and teleport pattern.
Picking the starfish up and putting them back in (or moving to inventory and then placing them again) does help for a bit as the starfish wander to a new spot, but eventually, they start the above behavior again.
The starfish are still registering as being inside the aquarium in terms of generating buzz, knowledge, etc.
In case it helps, the original shape of the aquarium was a rectangle. The new section I added can be seen at the bottom left of the screenshot and is the portion that is sticking out to the left forming the "leg" of a backwards "L".