Understanding and controlling fluid entrapment during forced imbibition in porous media is crucial for many natural and industrial applications. However, the microscale physics and macroscopic consequences of fluid entrapment in these geometric-confined porous media remain poorly understood. Here, we introduce a novel multidepth microfluidic chip, which can mitigate the depth confinement of traditional two-dimensional (2-D) microfluidic chips and mimic the wide pore size distribution as natural-occurring three-dimensional (3-D) porous media. Based on microfluidic experiments and direct numerical simulations, we observe the fluid-entrapment scenarios and elucidate the underlying complex interaction between geometric confinement, capillary number and wettability. Increasing depth variation can promote fluid entrapment, whereas increasing capillary number and contact angle yield the opposite effect, which seemingly contradicts conventional expectations in traditional 2-D microfluidic chips. The fluid-entrapment scenario in depth-variable microfluidic chips stems from microscopic interfacial phenomena, classified as snap-off and bypass events. We provide theoretical analyses of these pore-scale events and validate corresponding phase diagrams numerically. It is shown that increasing depth variation triggers snap-off and bypass events. Conversely, a higher capillary number suppresses snap-off events under strong imbibition, and an increased contact angle inhibits bypass events under imbibition. These macroscopic imbibition patterns in microfluidic porous media can be linked with these pore-scale events by improved dynamic pore-network models. Our findings bridge the understanding of forced imbibition between 2-D and 3-D porous media and provide design principles for newly engineered porous media with respect to their desired imbibition behaviours.