As long as putting the king in check isn't optimal…
In this variant the attacking piece will effectively be protected by how bad its move was. Creates some interesting incentives - the only way to checkmate is a move that is normally not optimal and has only one way out of check.