The atmospheres of highly irradiated exoplanets are observed to undergo hydrodynamic escape. However, due to strong pressures, stellar winds can confine planetary atmospheres, reducing their escape. Here, we investigate under which conditions atmospheric escape of close-in giants could be confined by the large pressure of their host star's winds. For that, we simulate escape in planets at a range of orbital distances ([0.04, 0.14] au), planetary gravities ([36%, 87%] of Jupiter's gravity), and ages ([1, 6.9] Gyr). For each of these simulations, we calculate the ram pressure of these escaping atmospheres and compare them to the expected stellar wind external pressure to determine whether a given atmosphere is confined or not. We show that, although younger close-in giants should experience higher levels of atmospheric escape, due to higher stellar irradiation, stellar winds are also stronger at young ages, potentially reducing escape of young exoplanets. Regardless of the age, we also find that there is always a region in our parameter space where atmospheric escape is confined, preferably occurring at higher planetary gravities and orbital distances. We investigate confinement of some known exoplanets and find that the atmosphere of several of them, including π Men c, should be confined by the winds of their host stars, thus potentially preventing escape in highly irradiated planets. Thus, the lack of hydrogen escape recently reported for π Men c could be caused by the stellar wind.