A robust strategy for the RANS shielding of attached boundary layers in a hybrid RANS/LES context is presented, addressing two major issues. Firstly, the attached boundary layers must be detected to ensure their RANS treatment, but the original shielding function used by automatic methods such as DDES (2006) or ZDES mode 2 (2012) fails for fine meshes and/or with adverse pressure gradients, motivating the present study. Secondly, even with a stronger shielding, there should not be an excessive delay in the formation of instabilities and resolved LES content in free shear layers. Both objectives cannot be simultaneously reached by only tuning a constant in the original shielding function. The proposed new ZDES mode 2 consequently involves three main ingredients, namely a second shielding function detecting the outer part of the wake layer including with strong adverse pressure gradients, an inhibition function which switches off the second shielding when flow separation is detected, and a significant enhancement of the destruction of eddy viscosity in grey areas. The calibration of the method relies on a set of boundary layers at various Reynolds numbers and pressure gradients conditions and is confirmed by a priori tests in three-dimensional flows around curved geometries. The resulting case-independent model, the new ZDES mode 2, is assessed on four test cases, namely a flat-plate boundary layer, a mixing layer, a backward facing step and transonic buffet over a supercritical airfoil. Overall, it is shown that the new ZDES mode 2 is relevant with respect to four objectives: protection of attached boundary layers for any grid cell size (including infinite mesh refinement) and pressure gradient, RANS shielding at least as broad as the original shielding in any situation, minimum delay in the formation of resolved LES content, and full compatibility of the resulting subgrid scale model in the LES branch with the other modes of ZDES (modes 1 and 3) ensuring a continuous treatment of resolved turbulence across zones treated with different ZDES modes. The new robust ZDES mode 2 consequently is a case-independent answer to the demand for a general automatic and robust RANS/LES treatment of attached and massively separated flows.