Engine misfire and Battery Drain

I’ve been having an engine misfire issue for a number of months. The dealership first changed the plugs, ignition cable kit and wiring, and that fixed it for a while. Then it came back and dealership couldn’t figure it out. They tested the O2 sensor and drove it around for a week to no avail. So I kept driving and have noticed a few trends. First the car drives better in overdrive, or when the rpms are 3,000 or above. Second when the car stalls, if I am trying to restart it immediately I have to give it some gas. Third it doesn’t mind idling in park. And fourth I’ve been having a battery drain. To solve the battery drain I’ve been charging the battery every night, and that definitely helps, but I only get about 20 miles before the misfire comes back, and sometimes the misfire is just there immediately regardless. So I just replaced my alternator, and that didn’t solve the issue either. So what else could be the issue? I’m kinda at a loss and driving the car on the highway when the misfire starts is not exactly safe.

year make and model

@BigMarc The tag says Volvo V70.

First find the battery drain.
(Get a mechanic to) put an ammeter in series with the battery.
With the car off, all accessories & lights off the drain should fall below 100mA.
May take a few minutes for all electronics to go into “sleep” mode.
If the current drops low the battery might be bad. Get it tested.
If the current is high or there are high current pulses pull fuses one by one until it goes away.
Whatever the fuse feeds is the culprit. I suspect the engine computer.

Here is a link to help you find the battery drain problem if you want to work on it yourself. Any good shop can do the work also.
http://www.aa1car.com/library/battery_runs_down.htm

There are many things that can cause a engine misfire. It sounds like the shop addressed some of the major ones. Things as simple as a faulty engine ground can cause the trouble. You can do search on the web to find out about some other things that can cause the trouble.