I don't doubt a large portion of those leaving the party was due to the anti-EU stance, but anecdotally, I know plenty of people who abandoned their support for them in the last election because they didn't want to face a second Independence referendum (even though it isn't, of course, a Westminster issue).
I would wager that right now, were a second referendum to be held tomorrow, it would fail by an even bigger margin than 2014. However, depending how the shambles that is Brexit turns out, support may jump over the next few years. I think Sturgeon has been shrewd putting it off until later, as most people are watching the Conservatives flounder horribly, to the point where we're staring down a 'no deal' scenario, with no scope for voters to get a follow-up 2nd EU referendum on that basis. As that reality unfolds, I think more people may sway toward a Yes, but I still think it'll take something cataclysmic to get over the finish line.