The story is in the data
The data shows that Brexit was a major factor in voter's decision at the ballot box.
Labour lost many of its working-class leave seats. This was due to its inability to commit to honouring the result of the 2016 referendum.
It is difficult to overstate the importance of Brexit in the 2019 election. Going into the campaign, Labour was caught between a rock and a hard place. If it hugged the middle and didn’t firmly commit to either leave or remain, it would have no clear position on the single most defining issue of the 2019 election. Alternatively, by coming out firmly as either remain or leave, it would alienate a significant portion of its electoral base.  Of the 54 seats the Conservatives took from Labour, 52 were areas that voted to leave the EU in 2016. This strongly indicates that Leave voters were willing to put aside their other grievances with the Conservative Party in order to get Brexit done. These traditional Labour voters would have stayed with the Labour party had they not abandoned the will of the people and ignored the 2016 referendum result. With these voters, the party would have likely held the seats necessary to prevent the Conservatives from building a majority. The fact is, the public saw a commitment to a second referendum as a dismissal of the 2016 referendum. For that, Labour imperilled its election chances and set the stage for an electoral rout.
Labour’s emergence as a Remain party was not a deciding factor in its election night loss. Labour did not only lose votes to pro-Leave Tories, but it also lost votes to the hardline Remain Liberal Democrats and Green Party. If Labour’s decision to go against the 2016 Brexit referendum result and campaign as a Remain party alienated the electorate, the lion’s share of Labour’s lost votes would have gone to the Conservatives or Brexit parties. This was not the case; Labour haemorrhaged votes to all the other parties.  It is true that Labour lost around 900,000 of its Leave voting supporters. However, it lost 1.1 million its Remain supporters, with many going to the Liberal Democrats or the Greens.  This exodus of Remain supporters did not have an issue with its Brexit stance but still saw the need to vote with another party in 2019. Additionally, most polls leading into the 2019 General Election had the majority of the British public wanting to remain as part of the EU. If most of the country wanted to stay in the EU, why would a pro-Remain party take such a drubbing over its stance on Brexit?
[P1] Labour's seat losses were almost exclusively in constituencies that voted to leave the EU in 2016. [P2] This suggests that Labour's decision to push for a second referendum turned them away from the party. [P3] If Labour had not emerged as a Remain party, it would have kept these seats and performed better at the 2019 election.
[Rejecting P3] Labour didn't just lose seats to Leave parties, it also lost to other Remain parties. This suggests that Brexit was not the main factor at play in Labour's election defeat.