People generally agree that grades don't matter in graduate school because they are reflective of your understanding of other people's work. What matters is the work you did and your research.
But could it be said they matter to the same extent as undergraduate grades when applying for a job? For example, if an employer was screening candidates for a data science or software engineering position and one candidate was a graduate student and another an undergraduate student and both had a similar GPA would the graduate student be considered a stronger candidate?
If employers consider the grades in courses relevant to their position for undergraduates, so on that basis if you do well in graduate courses related to that position shouldn't you be given preference or at least seen as an equally strong candidate?
Although it's true that the expectations for graduate students should be higher than for undergraduates, if two candidates are being considered then the graduate student will probably be more knowledgeable if they have a similar GPA and other experience.