Signing a file does not encrypt it. When Alice signs a file she usually signs the whole file. So she calculates a hash of the whole file and signs only the hash with her private key and attaches this piece of information to the file.
Bob uses her public key to decryptverify it and getgets her calculated hash. He then calculates the hash of the file himself (without the signature of course) and checks both hashes. If they match its the same exact version of the file Alice sent. If they don't match Mallory could have changed it.
The file itself never gets encrypted, and of course you can just remove the signature, but then it's not signed anymore (and therefore worthless).
For more technical and detailled information please refer to forests answer: https://security.stackexchange.com/a/198473/191453