Would that means I wish that or if only, a literary way of voicing a strong wish, usually about something that is not true.
Would that I had saved more money. You can picture someone staring at an empty bank account.
This is not the everyday would of I would like a coffee; the whole two-word phrase works as one unit and sounds old-fashioned.
Two quick examples
Would that we had seen her before she died. You can picture someone saying this at a funeral, full of regret that they never got the chance to say goodbye.
Would that it were that simple. Imagine a friend tells you the fix for a broken friendship is one honest chat, and you reply with this line, meaning if only it really were that easy.
Not the usual 'would'
Would that means I wish that or if only. It is a literary way of voicing a strong wish, usually about something that is not true. That is a different job from the ordinary would you use for polite preferences, as in I would like a coffee. Compare the two side by side: I would like a coffee states what you want now, while Would that I had saved more money looks back with regret at what you failed to do. In the second sentence, would that cannot be split or rephrased as a normal verb form; the whole two-word phrase works as one unit carrying the wish.
Would that I had accepted that job offer. You can picture someone reading the rejection letter from the company they turned down years ago, still wondering what might have been. Here the phrase carries the same regret as if only I had accepted that job offer, but in an old-fashioned, literary voice.
Everyday would is not a single frozen unit; it shifts with the sentence, as in She said she would call later, where it points to a future action. With would that, the two words work together as one expression, and the pairing itself carries the wish, which is why it sounds old-fashioned or bookish rather than casual.