Was there "such a marked shift"? In 2019 Labour ultimately committed to hold a 2nd referendum in which the party (or at least its leadership) would not support either remain/leave... which most of the electorate found bewildering and unconvincing. Labour lost Leave votes to the Conservatives and Remain votes to the Lib Dems (who couldn't turn them into seats though) and to the SNP (which might have been for more complicated reasons). See Is there any hard data on what factors motivated voters to switch from Labour to Conservative in the 2019 election?
During 2016-2019 the Labour position on Brexit was marked by I can't recall how many statements that were (kindly) described as "strategic ambiguity". That worked to their advantage in the 2017 election, but not so much after that.
And even in 2016, the Guardian ran an article titled:
Labour voters in the dark about party's stance on Brexit, research says
With only three weeks to go before EU referendum, there is concern in remain camp that more needs to be done to make position clear [...]
A campaign memo from Britain Stronger In Europe leaked to the Guardian shows that only about half of Labour voters have realised their party is in favour of staying in the EU, with the rest thinking it is split or believing it is a party of Brexit.
The analysis, sent to some Labour MPs, found that focus groups in London, Brighton and Ipswich over the past few weeks showed voters were “uniformly uncertain” about whether Labour was campaigning to stay in the EU. They did not know what Labour leader Jeremy Corbyn thought or believed he was for remain but “his heart isn’t in it”.
The latest report from Loughborough’s Centre for Research in Communication and Culture finds “Labour’s presence has flatlined in the press and faltered in TV coverage” in the past two weeks of the [referendum] campaign. Professor James Stanyer described the party as “almost invisible”.
“Labour voices are present in less than 4% of TV coverage and just 8% of print coverage of the referendum, and no Labour politicians are amongst the top 10 most frequently reported individuals,” adds the CRCC.
And a year later:
Mr Corbyn moved closer to an actively pro-Brexit stance in March 2017, instructing Labour MPs to vote to trigger Article 50 using the strongest tool at his disposal, a three-line whip.
Frankly it comes at little surprise to me that ultimately all these changes in position came at a price in terms of Corbyn's perception:
And yes, most of the change was due to his Brexit position(s).