For background, the fan goes on based on the heat of coolant coming out of the radiator (sensor in lower radiator hose), calculated catalytic temperature, vehicle speed, battery voltage, and air conditioning pressure. If the engine is hot, it is possible for the fan to run for a bit after you shut it down.
Now, you need to narrow this down. When you shut the engine off and open the front hood, if the fan between the radiator and engine is spinning, you'll know it. For most manuals, the fan is integrated into an assembly attached to the radiator on the engine side. However, some manual e46's do have the water pump-mounted fan with an electric pusher fan on the other side of the radiator between the bumper and radiator. In either case, you only have one electric fan.
So, is it the electric fan in the engine compartment that continues to run, and if not, then something else is draining the battery.