No, if they're both selling their labor, they are both
working class, not middle class.
Though heart surgeons often own practices and contract with facilities rather than being employees, so they are often middle class.
And, yes, real economic relations are complex and don't fall neatly into the categorization, are not of a continuum (e.g., lots of higher income workers that are don't actually love by applying labor to their own capital nevertheless have some some, potentially substantial, capital from which they derive some income (in many cases, not used for current needs but reinvested), and therefore don't face the same insecurity as most of the working class, while still having to deal with employer/employee relations the same way as the rest of the working class. This group shares some features of the working class (because of their primary source of support), the middle class (because the both rely on their labor and have non-trivial capital holdings that are important), and the capitalist class (because generally , to the extent they derive income from capital, it is not through application of their own labor.) Nevertheless, their primary engagement with the economy is as hired laborers, so dominantly, from an economic class perspective, they are working class.
(This is distinct from lifestyle, and from group identity -- indeed, the political manifestation of the divergence between identity and economic class explains a lot of apparent political irrationality jn which people expend considerable effort working against their own economic interests in the political realm because of an identity with an economic class that is not their own.)