Ask a Car Mechanic and Get Answers to Your Car Questions ASAP
Hello and welcome to JustAnswer!
Assuming the oil sender is a known good part then you could have a wiring problem or an actual oil pressure problem. If the problem happens only when hot or worse when hot then it's likely to be an actual pressure problem.
Sometimes an oil sender will rupture and leak oil into it's connector which then causes the light to come on. If your old sender had ruptured and the oil wasn't properly removed from the connector then it can cause the light to keep coming on.
If the connector is clean then the next thing I would recommend is checking actual oil pressure using a gauge. If oil pressure is low then the problem is internal in the engine.
If oil pressure is low it could be a plugged oil pump pickup, bad oil pump or sticking pressure relief valve, or bearing wear.
I've also seen some poor quality aftermarket oil filters cause the light to come on at idle. If this problem started right after an oil change then I'd recommend replacing the filter to see if that helps.