Hardware back button destroys the app

I have updated my capacitor to 3.0 and back button is closing my app. Can anyone please help ?