Check Rear Gate Latch Switch
WARNING: This page is about a different car, the 2016 Subaru Impreza and 2016 Subaru Crosstrek. However, it is still accessible from the selected car via links, so may be relevant.
Refer to "INSPECTION" of the "Rear Gate Latch and Actuator Assembly" in "SECURITY AND LOCKS" article. < Ref. to ACTUATOR , INSPECTION, Rear Gate Latch and Actuator Assembly. >