Has any pitcher ever thrown a 4-out immaculate inning, and if so, was it still considered immaculate?
That is 4 strikeouts on 12 pitches, with one batter having reached due to a wild pitch.
No. There has never been an MLB immaculate inning with four outs.
Every source available on immaculate innings is quick to list those pitchers who had managed the feat more than once at that point, and annotate additional information that is tangential to the feat, but none (especially from MLB themselves) refer to an inning where more than three strikeouts occur.
While impossible to prove a negative, this is very strong evidence that the feat has not occurred.
(Too long for a comment)
[N]o player has ever struck out four batters on twelve pitches in an inning.
in its List of Major League Baseball pitchers who have thrown an immaculate inning, referencing four sources but I could not find the claim in any of them.