Can we use DecisionTreeClassifier of sklearn for continuous target variable?
In the Wine Dataset you linked, the quality column is not a continues variable but a discrete. It takes integer value between 0 and 10.

When you use the DecisionTreeClassifier, you make the assumption that your target variable is a multi-class one with the values 0,1,2,3,4,5,6,7,8,9,10. So, the model tries to predict one of these and only these values.

When you use the DecisionTreeRegressor, the assumption is that any number between 0 and 10 is acceptable. Like the number 4.52356. As a result, the accuracy will be noticeable worst. If you still want to use the Regressor for some reason, you can try to round the outcome and then calculate the accuracy. Keep in mind that RMSA doesn't fit your problem. You have a multi-class and not a regression model.