As proposed by @Jack in this similar post, one can style each geometry and and common reference point. Doing so will align the line patterns between all rendered geometries (they could even be on different layers!).
The geometry generator expression should be union($geometry, make_point(-180,-90))
Let's note that each geometry is rendered once only, so it is more efficient than the other answer that requires, for every feature, to merge all geometries of the layer.
It is important that the reference point be to the south-west of every feature. For lat-longs, use -180;-90
.