I think the error means your OAuth 2.0 Client you’re trying to use to verify app ownership is not recognized as being associated with any Google Play app or the published app you mentioned.
You mentioned that the app was published on Google Play years ago, you can try referring to this documentation for another way to verify your App ownership. As per the documentation, the Android app ownership verification is only available for Google Play apps. You can also check these steps on how to authenticate your client using Play App Signing.
This OAuth 2.0 for Mobile & Desktop Apps documentation might be a good read and can be helpful for you.