I have seen a couple small parts online that look like they may do the trick.
Attwood's fuel vent line surge protector helps avoid refueling spills because the surge causes automatic fuel nozzles to shut off as the tank fills. Meets ABYC Standards. Glass-filled polypropylene construction and surge-ball design. Installs in-line with traditional 5/8" I.D. vent hose tank systems. Withstands oil, gas, and alcohol-blended fuels. Compact size allows installation inside gunwale in any orientation within 45 degrees of vertical. Includes two hose clamps.
I also saw something that made noise or chirped when it got closer to being full. Couldn't find it right now sorry.