Pbcmdcompiler returns -1 when signing is retried

Using version 2021.0. I have the project configured to sign the .exe file. Often this fails on the first try with message “The target file is not writeable because it is being used by another process.” Then I see “Retrying code signing in some seconds” and on the second try signing is successful. However, pbcmdcompiler returns an exit code of -1, which causes my build process to think it failed. This should be returning 0 since the file was successfully compiled and signed.