If you keep a goldfish in a 5 gallon tank and run an Fx5 on it, the fish is not going to grow to their full 24" potential. They will maybe reach 5".
They will stop growing until they are in a tank/setting in which they can begin growing again.
They release hormones in the water in which prevents them from growing.. it's called Adrenergic regulation of growth hormone.
Filtration is irrelevant. Water with a build up of these hormones (and other things such as nitrates) is, as Bluey said, "not the best water quality". If filtration is adequate, and water changes are performed A LOT ( example: 50% 2x a day) to keep water quality "the best", that goldfish WILL reach nose to tail lengthwise in that tank.
Edit: also been there, done that.

