I know with my 2003 3.0i, I have to have all the doors closed then open the trunk lid. I have to let the tail gate go all the way down and slam it shut. Then close the top hatch firmly. If I leave a door open it will not stay secure. Crazy design but it has done it since i have owned it.
Try that before spending $$$$.