(1) I had been working in the garden when she arrived, so I didn't hear her come in.
(2) I was working in the garden when she arrived, so I didn't hear her come in.
I think that past perfect continuous in (1) only refers to an action from the past up to/until the past point in time ( she arrived). We don't know if I was still working at the time she came in.
I think that present continuous in (2) refers to an ongoing action at the past point ( she arrived). We know that I was still working when she came in.
So, I think that using the present continuous as in (2) is more correct than using the present perfect continuous in (1). Are my opinions correct?