If you forget about what's happening in the dreams, and focus on what dreams are and when they occur then things may make more sense to you and be easier to deal with.
We experience vivid dreams during REM sleep, when our minds are most active, so if you are having lots of vivid dreams it's an indication that you're not getting good quality sleep and this is most likely caused by the sudden withdrawal of your medication. Do you have a repeat prescription lined up? Sudden withdrawal from medication can result in rebound symptoms, so it's never advised to come off certain meds suddenly.
Meantime, try to establish and maintain good sleep hygiene: establish a bedtime routine, set a bedtime, have a bath/shower, warm drink, avoid caffeine, don't use phone/tablet as the blue light they emit can interfere with sleep. Taking some exercise can help you get better quality sleep and relaxation techniques like mindfulness/breathing exercises can help (but take practice to work their magic, so not an instant fix).
I've not had a cigarette in almost 7 years but a couple of times a year I wake up and I've dreamed I've had a cigarette and have an "oh balls" moment before it gets put into context. I've heard others do the same after decades of abstinence, so I think it's common enough.
I've a history of vivid dreams, so I appreciate how real it can all feel and how it eats into the waking day to have them prey on our minds.