If you have a conventional dirtbike carb, and have replaced the needle and seat, and still have a gas overflow problem......then you might want to check if the float is moving freely inside the carb.
Open the carb, and with the bottom off, gently push the float up and down.
You should be able to see it pushing the needle into the seat with no resistance.
You may also want to check the float height whilst it is open.
It took me a long time to get mine set correctly after purchasing the bike secondhand. Mine was overflowing same as yours.
Also, when re-installing the carb to the bike, make sure it is in the correct vertical position (mine has small markings on the carb and rubber boot to line up).