My phone is in a continuous cycle of dying
I have an iPhone 6S and it dies at around 40%. I plug it into charge, and it does the starting up/reviving screen. Once it has completed that stage, it dies again. I cannot take my phone out of charge anymore or it will die. Even though it has been in charge continuously, the battery keeps going down. My phone is not the newest, however this still shouldn't be happening - it makes no sense.
iPhone 6, iOS 12