[verb た-form] + はいいが [verb た-form] + はいいけれど [verb た-form] + はよかったが [verb た-form] + はいいものの
The grammar pattern ~たはいいが is used to express that while an action was taken (and perhaps seemed fine at the time), an unexpected problem, difficulty, or undesirable outcome followed. It conveys the nuance of "I did X, which was all well and good, but…" – emphasizing the gap between the initial action and the troublesome reality that resulted.
The first clause (before はいいが) states the action that was completed, and the second clause describes the problematic consequence or situation that arose.
This pattern carries a tone of regret, irony, or mild complaint. The speaker acknowledges that the action itself was not necessarily wrong, but the outcome was not what they hoped for. It often implies that the speaker acted without fully thinking things through, or that circumstances beyond their control led to a disappointing result.
Several alternative endings can be used in place of が:
~たはいいけれど / ~たはいいけど – more casual and conversational
~たはいいものの – slightly more literary and formal
While 〜~たものの also expresses a contrast between an action and an undesirable result, ~たはいいが more strongly emphasizes the speaker's initial optimism or the apparent "good" nature of the action before revealing the problem. 〜~たものの is more neutral in tone.