Hi Tom and welcome to the community.
From what I understand when, you're trying to use the laptop with the new battery (without the laptop being plugged in the power socket) and it randomly shuts down because of battery power loss? If this is the case, then your laptop might have a faulty connection and your old battery might not have been the problem. I'd recommend that you send it to computer service shop, so that the guys there can test it and diagnose the issue.
Hope that helps.
Boogieman_WD