The fact that Corbyn looked to have been dragged ‘kicking and screaming' to supporting another referendum after the European election result, was a very bad look for the party and very damaging.
It was a difficult balance for Labour though, as while most Labour voters in most seats that they were defending and targeting voted to remain even if those areas as a whole voted to leave, with the nature of FPTP moderate swings of leave voters away from them in leave voting seats could be and ultimately were very damaging. On the flipside most Tory party members and voters already supported Brexit ahead of the EU referendum in 2016 with many of those who supported remain including the likes of Ken Clarke not wanting another referendum, all their candidates in 2019 supported Johnson's deal, and the majority of seats that they were defending and targeting voted to leave. So it was much easier for them.
To be honest I think if they'd been a pro-EU and pro-2nd referendum party at the time of the 2017 GE, I think that they'd have done far worse then and I strongly doubt they would have removed May's majority. May wanted 2017 to be a Brexit election, but at that stage there wasn't really much of a Brexit debate or appetite or demand for another EU referendum. Most people, even if reluctantly, accepted that we were leaving, and the formal withdrawal negotiations hadn't started yet. It was only in 2018 when it was clear that those negotiations were going shambolically, that support for another EU referendum and to stop Brexit really grew. So as a result 2017 revolved more around domestic issues with Brexit hardly mentioned during the campaign. Had Labour supported remaining in the EU back then, May would have got her Brexit election and I think would have increased her majority with Labour suffering.
Some Labour MPs and supporters in the media, have said that Labour’s policy in 2019 should have been to negotiate a new 'softer' Brexit deal without putting it to a referendum. But then they would have gone into the election offering neither the promise of an EU departure by the end of January 2020 to please leavers, or the promise of another referendum to please remainers, and so surely would have suffered just as much if not more.