Large dynamic stress off the fault incurs an inelastic response and energy loss, which contributes to the fracture energy, limiting the rupture and slip velocity. Using an explicit finite element method, we model three-dimensional dynamic ruptures on a vertical strike-slip fault in a homogeneous half-space. The material is subjected to a pressure-dependent Drucker-Prager yield criterion. Initial stresses in the medium increase linearly with depth. Our simulations show that the inelastic response is confined narrowly to the fault at depth. There the inelastic strain is induced by large dynamic stresses associated with the rupture front that overcome the effect of the high confining pressure. The inelastic zone increases in size as it nears the surface. For material with low cohesion (~5 MPa) the inelastic zone broadens dramatically near the surface, forming a "flowerlike" structure. The near-surface inelastic strain occurs in both the extensional and the compressional regimes of the fault, induced by seismic waves ahead of the rupture front under a low confining pressure. When cohesion is large (~10 MPa), the inelastic strain is significantly reduced near the surface and confined mostly to depth. Cohesion, however, affects the inelastic zone at depth less significantly. The induced shear microcracks show diverse orientations near the surface, owing to the low confining pressure, but exhibit mostly horizontal slip at depth. The inferred rupture-induced anisotropy at depth has the fast wave direction along the direction of the maximum compressive stress.