Were you trying to treat your cough with the Flonase? Was your doctor clear on that?
Flonase can cause coughing as a side effect - https://www.rxlist.com/flonase-side-effects-drug-center.htm - which is probably why your doctor said to stop using it.
If your cough got better using it, maybe it was helping some allergy symptoms, like post-nasal drip.
Did you ask your doctor what he meant, or try to clarify anything? Always feel free to ask questions and clarify anything you don't understand with your doctor.