I think the ghost would be attached to the person in some way, It doesn't matter if they are inside or outside.
Didn't you ever watch Beetlejuice?You leave the house you get eaten.
Spirits stick to where they were killed/trauma occurred. Could be outside, could be inside. Movies just love the "haunted house" theme.