Wait. A 2017. How old is the battery and have you gotten a comprehensive battery test done? On the prior gen, the power tailgate starts to act finicky before a myriad of other symptoms show up on my friend's 2007 Touring.
If the battery is old or weak, I would either full charge the battery first and rule out low battery/power issue(s).
If the battery is old or weak, I would either full charge the battery first and rule out low battery/power issue(s).