Production apk was signed as Android Debug and now I can't send updates

I’m having the weirdest problem updating my app on Google Play. I built the apk that’s currently live on Google Play like a year ago and I’m trying to send a new version. When uploading the apk I see the error:

You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate.

I saved the keystore and passwords from the original apk and I’m using the same one for the new version. So I decided to verify the signing using a method I found here: android - Can't upload updated APK to Google Play due to different certificate - Stack Overflow

Turns out my old apk shows it’s signing as X.509, C=US, O=Android, CN=Android Debug. I downloaded the current apk form the Google Play console and it also says that the signing is X.509, C=US, O=Android, CN=Android Debug. I don’t understand how my apk ended up with the debug keystore and even more confusing how did it pass in Google Play.

Has anyone run into this problem? Any ideas on how to solve it?

Android person here.

You can upload a debug build. Unfortunately, there is absolutely nothing you can do about it now. You’ll have to create a new app on the play store and make sure it’s a production build.

Sorry. Make sure you check the Launch Checklist next time.