Luke did not stay on the island simply out of fear or shame. He believed that he was doing what’s best for the galaxy. All the teachings he gives to Rey serve to explain this reasoning. However, fear and shame had a hand in leading him to those conclusions. His fear of loss led him to cement Ben’s turn to the dark, his fear of failure led him to renounce the Jedi.
But the reason he stayed on the island and refused to fight was much deeper than simple fear. I would propose changing the line to “It was fear that led me here”. I think that under the context of their conversation this subtle change would help avoid any apparent misrepresentation or oversimplification of TLJ’s story.