Within the Online Banking Setup tool AqBanking accounts can be matched with GnuCash accounts. If a GnuCash account has been matched with the wrong AqBanking account this match cannot be removed (easily) again. Desired solution: In order to allow the deletion of wrong matches it should be possible to select one or multiple matches on the "Match Online accounts with GnuCash accounts" page. There should be a push button "Delete selected matches" on this page which removes the GnuCash account from the selected account matches. Workaround: There is a workaround to achieve the deletion of unwanted matches. You need a GnuCash version including PR https://github.com/Gnucash/gnucash/pull/649 as a prerequisite. If you have a GnuCash account g1 which is erroneously matched with an AqBanking account a2 you have to decide between one of the following two cases: 1. If g1 shall be matched with a different AqBanking acccount a1 instead, you could double click on a1 and match it with g1. As a result of this action the previous match of g1 with a2 is removed. 2. If g1 shall be matched with no AqBanking account anymore you need to create a dummy GnuCash account gd, match gd with a2, and finally delete gd again.
See PR https://github.com/Gnucash/gnucash/pull/659 for an implementation of the suggested solution.
Your fix PR #659 was added to maint and was in version 3.9