I think the latter is true, but I have to admit that I need to develop a better understanding of exactly where the similarities and the distinctions lie. So, with this in mind, let me compare two quotes from important thinkers in both traditions.
Here is Friedrich Engels, from his Socialism: Utopian and Scientific (1880):
With the seizing of the means of production by society, production of commodities is done away with, and, simultaneously, the mastery of the product over the producer. Anarchy in social production is replaced by systematic, definite organization. The struggle for individual existence disappears.
Then, for the first time, man, in a certain sense, is finally marked off from the rest of the animal kingdom, and emerges from mere animal conditions of existence into really human ones. The whole sphere of the conditions of life which environ man, and which have hitherto ruled man, now comes under the dominion and control of man, who for the first time becomes the real, conscious lord of nature, because he has now become master of his own social organization.
The laws of his own social action, hitherto standing face-to-face with man as laws of Nature foreign to, and dominating him, will then be used with full understanding, and so mastered by him. Man's own social organization, hitherto confronting him as a necessity imposed by Nature and history, now becomes the result of his own free action.
The extraneous objective forces that have, hitherto, governed history, pass under the control of man himself. Only from that time will man himself, more and more consciously, make his own history — only from that time will the social causes set in movement by him have, in the main and in a constantly growing measure, the results intended by him. It is the ascent of man from the kingdom of necessity to the kingdom of freedom.
There are two key ideas here. The first concerns the historical process (the means) by which the ultimate ends of man are reached. The second is a description of what these ends are.
How does man reach his ultimate state of perfection? For Engels, the growth of productive forces matters a great deal. It creates a large surplus of goods, which then removes the need for a division of labour. So, instead of resources by necessity being concentrated amongst a small ruling class, they can be shared by everyone in society. It becomes possible to have society as a whole, through the state, control the means of production. This then means that production can be deliberately and rationally planned (Engels writes later that "Socialized production upon a predetermined plan becomes henceforth possible.")
But does all this matter? For Engels, it matters a great deal. It is the way that we finally start to live a human rather than an animal existence.
For Engels, an animal existence is heteronomous (the state of being beholden to external forces). When man directs the forces of production for deliberate social ends, he gains a power over nature and history, in fact over "extraneous objective forces" and thereby becomes human.
Man will no longer be dominated by laws of nature, no longer have to organise his social existence to meet what external necessity compels, but will become instead the lord of nature.
Let's compare all this to a brief quote from a highly influential liberal thinker, Isaiah Berlin:
I am free because, and in so far as, I am autonomous ... Heteronomy is dependence on outside factors, liability to be a plaything of the external world that I cannot myself fully control.
Berlin was not a Marxist, so he wouldn't have shared the grand Marxist theory of the historical process by which human autonomy was to be achieved. But there's a recognisable overlap when it comes to ultimate ends. Engels aimed for a "kingdom of freedom" in which man is no longer governed by extraneous objective forces, but now dominates and controls nature and his own destiny. Berlin too aims for a freedom in which we are no longer dependent on outside factors, are no longer "playthings of the external world".
Engels conceived of man collectively pursuing these ends, whereas Berlin most likely focused on the individual pursuit of these ends. But it seems difficult to deny that there is an overlap in the ultimate good being chased, namely man no longer being subject to heteronomy but liberated to a condition of autonomous freedom and control. That is the gist of the project being pursued by both the Marxist Engels and the liberal Berlin.