I have an 04 Forester. A couple of years ago the local Subaru dealer was still able to supply the Subaru branded dog-guard, even though our model was no longer in production. This may be still the case or one may be available second hand.
It fits well, bracing between top of the suspension covers and the window reveals. Over time it has distorted the plastic of these items. This is only cosmetic, but could be an issue if we ever sold the car.
It has a cut-out for the centre seat belt to run through which is fairly critical.