To "drive by" could mean to pass something or also to do something while there.
To "drive past" only means to pass something.
Even though I hailed the taxi it just went and drove by me.
Even though I hailed the taxi it just went and drove past me.
Both of those are fine, except that I corrected the tense.
This is where the difference between the two matters:
I always drive by the store on my way home, so I can pick up something for you.
This makes perfect sense because you are stopping at the store on the way home. By using "drive by" here, you are conveying that you don't have to pass the store on the way home, but you choose to take that route so that you can stop to get something.
I always drive past the store on my way home, so I can pick up something for you.
I can make sense of this but the second half of the sentence surprises me because I already understood that you passed the store and did not expect you to mean that you stopped. It's not completely wrong though and I wouldn't fault someone for saying/writing this. I would simply expect a different outcome.
I always drive past the store on my way home, so I can pick up something for you just in case.
This corrects the only fault I see by allowing the action of stopping and picking something up to only happen sometimes, and so the "driving past" is now appropriately communicating that you are passing the store regularly unless you need to stop.