Obama did that while losing Texas by 16, Georgia by 8, and only winning Virginia by 4 because his margin in the midwest was more democratic compared to where the country voted.
By comparison Hillary lost by 9 and 5 in Texas and Georgia, won by 5 in Virginia, while still getting +2 and 227 in the EC as the midwest states trended to the right of where the country voted. You could easily get a repeat of 2016 with +4 nationally as Democrats have plenty of room to grow in Virginia, New Mexico, Nevada, and Colorado, and grow while still losing in former heavy republican areas like Texas, Georgia, Arizona, NE02, and even Alaska, South Carolina, and Montana.
Long story short, if Biden replicates Obama 2012 map, he will more than likely win by more than 4 nationally because all signs are pointing to midwest once again being more to the right of the national vote.