2017 Subaru Loyale tailgate opens randomly

tailgate opens randomly and battery dies . what am i doing wrong

Any chance you’re sitting on a remote fob which is popping open the trunk, then the light in the trunk stays on draining the battery?