OK, thanks. Still sounds like a carb problem even though it was rebuilt -plenty of bad rebuilt carbs. You should be able to shut it down and fuel remain in the bowl of the carb. That said, it should fire right up and run with the gas in the bowl while the fuel pump draws gas into the line to continue the flow of gas to the carb.
If there is a leak within the carb, the gas could be running dry in the bowl. Do you see any white wispy "smoke" rise up out of the carb when you shut the engine off? You will need to remove the air cleaner just before you shut the engine off to see this. The heat from the warmed up engine will evaporate the gas as it leaks out the carb. If it is leaking, MAKE SURE you have a FIRE EXTINGUISHER on hand when you remove the air cleaner, shut the engine off, and observe the carb.
When you shut the engine off and it diesels on, it is because it is still getting fuel/air. One of the ways this happens is that the throttle plate is not fully closed and the engine draws air past the plate. If you have a gas leak, gas is also being drawn in and the engine will continue to run on.
Does your car have an electric idle stop solenoid?
This info below is from a 1968 -1973 Chilton's Repair & Tune-Up guide which only has the 350CI and not the 326, but some of this should still apply. You did not say what year the engine was.
Timing for the 326CI shows to be 6 degrees Before Top Dead Center at the crankshaft pointer. Make sure yours is the same.
What is your engine idle speed when the car is in Drive (automatic?)? Idle speed in Drive for an automatic with the electric idle stop solenoid is 500 RPM's with it disconnected, and 650 RPM's with the solenoid energized. (100 more RPM's if your car has A/C)
Did you adjust your idle mixture screws? If they are running too rich, these can provide extra/available gas to the engine when you shut it off. I usually turn the screws in all the way until they stop - do not force them closed or run them down real tight, just turn them in gently until they stop. Then back them out 4 turns to get an initial setting. Then I screw one in at a time until the engine runs poorly (you will hear it) and then back it out to the point where the engine runs smooth and then stop. Then do the other idle mixture screw the same way.
If you installed a mild cam, you may not be able to drop your idle RPM's low enough using your idle speed screw on the side of the carb - which can cause a dieseling effect because the setting requires the throttle plate to be open more to get your engine to idle high enough with the mild cam so it does not stall out.
This is where an electric idle stop can be used if you do not have one. This is also why Pontiac used them. You can set the electric idle stop to completely shut off the throttle plate so no air can get into the engine and cause the dieseling when you shut the engine off.
So, check your timing. Check to see if your carb is leaking gas into the engine. Check & adjust your idle speed screw to get your RPM's down to 500 RPM's in Drive (100 more RPM's with A/C). Check your idle mixture screws and adjust.