The Labour membership is overwhelmingly remain, but were happy to campaign on an 'honouring the referendum' ticket in 2017, as brexit was perceived as a done deal. What changed between 2017 and 2019 is that - due to the campaigning by centrist remainers for the most part - it no longer felt like it was, and there was every possibility of overturning the result in one way or another. The change of policy didn't just come from within the PLP, but from the membership too. While it was one of the things that torpedoed any chance of winning this election, if it hadn't have done then the party would have split last year, in a far more substantial way than what happened - and even if they hadn't, the remain vote disappearing to the Lib Dems could have caused a similar catastrophic loss of seats.
They were trapped by Brexit. There was no way out.