I don't think the claim is that the works mentioned, and others such as Hobbes' Leviathan, are great works of literature apart from their philosophical ideas and arguments, conceptual analyses and sorting out of stubborn puzzles (aporiai as Aristotle called them).
The point is rather that philosophical tasks, those I've listed, can be carried out with more or less literary efficiency, clarity, elegance, imaginative metaphors, arresting similes, analogies, allegories. Plato's middle dialogues are replete with such literary devices, all framed in beautiful Classical Greek. It is unlikely that the Republic, to take one example, could be read just as literature because Plato's literary skill is in the presentation of philosophical ideas and arguments, and without a grasp of these the aptness of the similes, analogies and allegories that drive the text along is lost.
The same is the case with Berkeley, whose limpid, flowing prose is a literary pleasure - but only if one can following the argument, or rapid sequence of arguments. Hume's urbane and elegant style, touched with irony, is a joy but not if one cannot follow complex philosophical arguments.
In this sense the texts I've mentioned, and those you've mentioned too, are not strictly 'great works of literature' as one might say 'in their own right'. I could say that of the plays of Marlowe or Shakespeare, Henry James' 'Portrait of a Lady', George Eliot's 'Middlemarch' or James Joyce's 'Dubliners' and a host of other plays and novels. They are literature and can be appreciated as such by that well-known figure, the general reader. The philosophical works we've been talking about are not great literature in this accessible way. But they are great literature to those who can comprehend the philosophical ideas and arguments of Plato, Berkeley, Hume and others and, comprehending, relish the consummate literary mastery with which those ideas and arguments are expressed.