Why does my Yorkshire Pudding always flatten within minutes after I remove it from the oven? I always use a very hot oven and make sure the batter is at room temperature befor I put it in the oven. It rises beautifully in the oven but falls as soon as I take it out.
I just realized that you said 'minutes after' before you said 'as soon as I take it out'.
If it's as soon as you take it out, it's a problem with it being undercooked.
If it takes a few minutes to deflate, it can be an issue with cooling them too quickly. You can get around this problem by taking a sharp knife or skewer and poking a couple of holes in the top of each one.
This will allow any built up steam to escape (which will unfortunately cool it off), but it will prevent the trapped air from creating a vaccuum as it cools, causing it to collapse.
Although it's possibly undercooked as the comments say it is also possible that there may be too much moisture in your oven for your puddings to set. If they can't set and crystallize they won't hold their structure and they will sink.
Try this: once they get to the top of their rise open the oven for 10-20 seconds to let the moisture. Then close and cook them until golden.