It is God’s desire that everyone be saved, but not everyone is saved. How’s that possible if God’s will prevails?
A simple misunderstanding of the verse you are using. While I am sure you will reject my explanation - we must agree that the word "all" can mean many thing. For example: All in number - All in a group - All in type or manner. This is excepted throughout every meaning of the English word "all".
So the question in this verse:
1Ti_2:4 Who will have all men to be saved, and to come unto the knowledge of the truth.
Is which meaning does all have in this context. In verses 1-3, Paul says we are to pray for all. However, in verse 2, he clarifies the "all" by mentioning Kings and those in authority. This so we (believers) can lead quite and peaceful lives. Therefore, the "all", means all manner of men in authority.
In verse 4, the "all manner" of men is carried forward. God does not have one type or manner of man that is being saved. It is all manner of men from all walks of life.
As you well pointed out - If God had desired that "all" (As in number), were to be saved - Then God failed in His purpose. May it never be!!!
John Gill had much to say on this Verse:
Who will have all men to be saved,.... The salvation which God wills that all men should enjoy, is not a mere possibility of salvation, or a mere putting them into a salvable state; or an offer of salvation to them; or a proposal of sufficient means of it to all in his word; but a real, certain, and actual salvation, which he has determined they shall have; and is sure from his own appointment, from the provision of Christ as a Saviour for them, from the covenant of grace, in which everything is secured necessary for it, and from the mission of Christ to effect it, and from its being effected by him: wherefore the will of God, that all men should be saved, is not a conditional will, or what depends on the will of man, or on anything to be performed by him, for then none might be saved; and if any should, it would be of him that willeth, contrary to the express words of Scripture; but it is an absolute and unconditional will respecting their salvation, and which infallibly secures it: nor is it such a will as is distinguishable into antecedent and consequent; with the former of which it is said, God wills the salvation of all men, as they are his creatures, and the work of his hands; and with the latter he wills, or not wills it, according to their future conduct and behaviour; but the will of God concerning man's salvation is entirely one, invariable, unalterable, and unchangeable: nor is it merely his will of approbation or complacency, which expresses only what would be grateful and well pleasing, should it be, and which is not always fulfilled; but it is his ordaining, purposing, and determining will, which is never resisted, so as to be frustrated, but is always accomplished: the will of God, the sovereign and unfrustrable will of God, has the governing sway and influence in the salvation of men; it rises from it, and is according to it; and all who are saved God wills they should be saved; nor are any saved, but whom he wills they should be saved: hence by all men, whom God would have saved, cannot be meant every individual of mankind, since it is not his will that all men, in this large sense, should be saved, unless there are two contrary wills in God; for there are some who were before ordained by him unto condemnation, and are vessels of wrath fitted for destruction; and it is his will concerning some, that they should believe a lie, that they all might be damned; nor is it fact that all are saved, as they would be, if it was his will they should; for who hath resisted his will? but there is a world of ungodly men that will be condemned, and who will go into everlasting punishment: rather therefore all sorts of men, agreeably to the use of the phrase in 1Ti_2:1 are here intended, kings and peasants, rich and poor, bond and free, male and female, young and old, greater and lesser sinners; and therefore all are to be prayed for, even all sorts of men, because God will have all men, or all sorts of men, saved; and particularly the Gentiles may be designed, who are sometimes called the world, the whole world, and every creature; whom God would have saved, as well as the Jews, and therefore Heathens, and Heathen magistrates, were to be prayed for as well as Jewish ones. Moreover, the same persons God would have saved, he would have also