A language model is trained to predict each token from the tokens before it. If attention could see the future, it would simply copy the answer and learn nothing useful.
You will test for leakage, write the mask so that rows stay normalised, and handle padding the way batches require.