Any idea what the battery level is (approximately) when it does restart on its own? Is the battery level after the restart much different?
I agree it probably isn't the battery, but it's still worth checking the battery health using Accubattery. If it's <85%, then the battery is deteriorating. Remember that the battery LG used as a replacement may have been sitting on a shelf for 3 years, which means it may have already been deteriorating. Also, batteries can be defective and fail a lot earlier than expected.