There are many decompiler programs that instantly create folders with java source code from apk. But there are applications that are not decompiled, so there is protection. How can I implement protection against decompilation of an android application? No normal answer is given anywhere! Only links to general documentation.
The first and most important thing to understand when talking about software protection is that 100% protection does not exist. As they say, "if they want, armored doors won't help."
You can use third-party solutions in the form of, for example, various obfuscators. You can write your own defense, as, for example, one of the authors on Habré did. But in any case, nothing will guarantee that your application code will not be restored sooner or later.