An Android application is signed with a certificate. If the certificate stays the same, you should be able to do in app purchases, no matter which modifications you did. There are APKTools allowing to reuse the same certificate, but those are not widely used by modders.