Transformers trained on proteins can learn to attend to Euclidean distance