Ms Dunbar, a councillor and deputy-leader of the SNP group on Aberdeen City Council, took 18,514 votes.
This was a clear 9,000 votes-plus ahead of second place Conservative candidate Harriet Cross, who polled 9,488 votes in her first election contest. The 30-year-old rural chartered surveyor of Deeside substantially boosted the Tory vote in the constituency.
Ms Dunbar said the allegation of sexual harassment against Mr McDonald, who resigned as children’s minister in 2017 and then from the party the following year before serving as an independent, had not been a factor in the campaign.
She said: “It’s not something that crossed my mind. Mark worked hard for the constituency as a SNP representative and also when he was an independent.
“I never heard anything from anyone about it. You are the first person to mention it.”
She said the election had been a “very strange” one given the absence of door stopping, but the mood had been good.
Ms Dunbar added: "I’ve been campaigning for more than 30 years and I think this is the first time that we have not chapped one door, so that is huge for the SNP campaign.
“I’ve had a lot of support from emails and the mood has been good, but you never quite know until the result is in. I’m just chuffed as my grannie would say.”
The turnout was strong in Aberdeen Donside, rising from 50.6 per cent in 2016 to 58.3 per cent this time round.
Ms Dunbar said: “Hopefully it means that people are engaging in politics more.
"Our First Minister has done a fantastic job in the past year during Covid. Her message was strong that if you wanted her to continue to lead us through this pandemic, come out and vote and Aberdeen Donside have.”
Ms Dunbar has served as a councillor since 2007 and lives in her ward, Northfield and Mastrick North.
She added: “I have lived in my ward for 14 years ...they are nae feart to tell you when you have done something wrong. I’m a big believer in sticking up for folk and I will continue to do that.
"Donside is made up of so many different communities and we have been hit by the perfect storm. We have got the oil and gas industry downturn, Brexit and Covid.
"There is going to be an awful lot of work to be done to make sure that Aberdeen Donside is represented and anybody that knows me knows that I have quite a loud mouth and I don’t tend to let go of stuff.”
Ms Dunbar will serve as a councillor for another year and said she will donate her council salary to local charities when both wages start to come through.
She said her priority was “to get an office, and get cracking.”
Labour candidate Heather Herbert came in third place with 5,505 votes.