So this won't work unless you have a large region that's actually just 0. If Plot3D doesn't evaluate Sin[x + y^2] /. {0 -> Indeterminate} at a point that produces exactly 0 them it won't work.
So you'll see it work here:
Show[Plot3D[
If[Last[Flatten[NSolve[p == x*Log[t + 1], x, Reals]]][[2]] > 6, 1,
If[Last[Flatten[
NSolve[p == x*Log[t + 1], x, Reals]]][[2]] < -0.25, 0,
Last[Flatten[
NSolve[p == x*Log[t + 1], x, Reals]]][[2]]]] /. {0 ->
Infinity}, {t, 0, 5.4}, {p, -1, 1}, PlotStyle -> Opacity[0.35],
FaceGrids -> All, PerformanceGoal -> "Quality",
ColorFunction -> "Rainbow", PlotLegends -> Automatic,
PlotTheme -> "Web", ImageSize -> 700, BoundaryStyle -> Thick,
AxesLabel -> Automatic, RegionFunction -> Function[{z}, 0 <= z]],
PlotRange -> {{0, 5.4}, {-1, 1}, {-1, 1}}]
But... I mean maybe it'd be easier to use an If Statement instead of Replace (/.)
Plot3D[Sin[x + y^2] /. {num_ /; Abs[num] < 0.1 -> Indeterminate}, {x, -3, 3}, {y, -2, 2}]