It will overfit in both cases, since they are technically equivalent. They produce the same trades. The only difference is an offset to Entry.

The overfitting is not due to Penalty, but because you're likely training on random noise when you optimize Entry in this way.