As you know, the Brexit referendum was a UK-wide referendum. How different parts of the UK voted may be interesting, but it doesn't affect the result.
When a referendum was held in just Scotland, then their vote was in favour of remaining in the union (the UK, that is).
The SNP position is wholly inconsistent. The vote that wasn't just in Scotland, they want to treat as though it were - but the vote that actually was just in Scotland they want to ignore and reverse.
Of course, the truth is that the SNP will say anything to pursue their main aim of separating from the UK: if the Brexit referendum result had gone the other way, then the SNP would have found some different excuse to ignore the "once in a generation" referendum result, and hold a rerun.
It amazes me that the SNP mock and taunt the UK for breaking away from the union they were in - when that aim is the main reason for the SNP's own existence.