The Real Madrid forward – who has scored in every group game – thought he had his second when he pick-pocketed Jack Hendry and rolled beyond Angus Gunn.
VAR bailed the Scots out - the officials deciding the defender had been tripped - when they couldn't help themselves.
Carlo Ancelotti was not a happy man, but his talisman soon had his second, nodding in at the back post after the feeble Scots failed to clear in first-half stoppage time.
Vinicius Jr could have had a hat-trick. Brazil could have had five.
And yet Scotland will have felt a bit sore going in at the break two goals down as they looked the best they have this tournament in possession and on the front foot.
Perhaps that's saying something, though.
Without captain Andy Robertson - who was ripped by Rayan, yet saved by Gunn - in the second half, the Scots again started brightly. But Brazil were toying with them.
Two soft penalty claims and a Scott McTominay header arrowed at Alisson were forgotten of when Newcastle midfielder Bruno Guimaraes dispossessed Kenny McLean, setting up Matheus Cunha to smash home.
Scotland now face an anxious wait if they are one of the best eight third-place finishers as they look to reach the last 32 despite only defeating Haiti on matchday one.