Are there any tall buildings around? Otherwise, it is caused by airflow. Rain in the flue will not cause problems. In addition, never use an exhaust fan in a room with a fire. The exhaust fan will cause indoor negative pressure and the flue will flow backwards.
You can try to insert three tees into a horizontal I-shape, and the effect is very good.