I was just about to upgrade my f26 router when I read about this issue. As a test, I installed wireguard on a f27 host from scratch. It just worked. So I suppose, removing before upgrade and installing afterwards should avoid Germano's issue.