in the scarlet letter how was roger leaving hester for 7 years worse than what dimmesdale's sin

I don't know what you mean. What, exactly, was Roger's "sin"? That he refused to make it known that he was Hester's husband, or that he was seeking revenge against Dimmesdale? And what was Dimmesdale's "sin"? That he fathered a child "out of wedlock" AND/OR refused to admit it and lived as a hypocrite? You have to decide those things. Hawthorne did not. And only you can decide what the greater "sin" is. It's a matter of opinion?