Do you mean how do you ignore the backprop through the padding sequence?
Actually, you don’t need to do anything about that. If your neural net is trained well enough (for sufficient train data and enough epochs), it’ll learn to just ignore those extra paddings.
A good way to test is to increase the sequence length to 100. You should still expect similar as you’d get with a sequence length of 10.