There is no fundamental shift in stance, rather a shift in policy to achieve their aim.
The Liberal Democrats (and more particularly the SDP wing) have always been a pro-Europe party. The SDP split from Labour in part over the (then) Euroskeptic position of the Leadership. The SDP-Liberal alliance, and later the Liberal Democrats have been consistently the most pro-Europe of the major UK political parties.
In 2008 the policy was to cement the UK's position in the EU by holding a new referendum. Their goal was to secure a mandate for closer integration with the EU including membership of the Euro currency. In the unlikely event that they won a majority in Parliament, this would (they would have hoped) result in a significant majority for continued membership of the EU (if the Lib Dems had won, the country would have had to have swung significantly in favour of the EU, making a pro-EU result very likely)
They opposed the "renegotiate and referendum" policy of David Cameron, as they did not think the renegotiation process would yield significant benefits for Britain, and would, therefore, make an anti-Europe result more likely in the referendum.
Following the referendum, the Lib Dem's stance of "pro-Europe" has continued: initially they favoured an agreement that would have kept the UK in most of the EU structures, such as the Single Market and the Customs Union.
When it was clear that the government was negotiating a "hard" brexit that would result in the UK leaving the Single Market, they changed policy to holding a new referendum on the agreement (with their preferred option of not leaving on the ballot). In the 2019 election they maintained their pro-EU stance, but hardened it slightly by stating that a vote for the Lib Dems would indicate support for remaining in Europe, and if they won a majority, this would indicate sufficient support for Parliament to overrule the 2016 referendum, without a further vote.
So the pro-EU stance has been consistent, but the policy to achieve their aim has changed.
2008: Support pro-eu referendum
2015: Oppose renegotiation followed by referendum
2017: Support referendum on brexit deal (with option to remain)
2019: Oppose referendum, but prefer referendum to leaving the EU