The idea of "value" independent of price is something treated by Marx as a normative claim that neither Adam Smith or Ricardo developed. When Ricardo or Adam smith talked of "value", they just meant "price" but in some notional unit of currency which was irrelevant to the discussion at hand. E.g. they wanted to discuss prices in a barter economy.
Adam Smith explored the labor theory of value in the context of primitive societies with fixed capital. In that case, you do get prices scaled to labor inputs, as capital is constant.
Ricardo tried to develop more sophisticated models than those with fixed capital, but did not have the tools to determine price setting, and finally admitted "I am not satisfied with the explanation I have given of the principles which regulate value.".
It wasn't until economists started using math more seriously and included production functions and utility functions that they were able to formulate a more general theory of price setting involving marginal costs and benefits. This allowed the creation of numerical estimates for things like price elasticity that provided useful information for price setting and allowed (in some cases) for falsifiability and even laboratory experimentation. See the famous experiments of Vernon Smith, for which he won a Nobel Prize. https://www.econlib.org/library/Enc/bios/SmithV.html
Thus standard economics was able to go bit beyond the thought experiments of Ricardo and Smith whereas Marx continued the process of philosophically musing about value in a normative sense, now removed from any actually observed prices, and far off into the world of political economy rather than economics per se.