Insights into the inner workings of transformer models for protein function prediction