There is a checkbox that allows you to keep the account team when changing the owner as described here:
You might be remembering something similar to the idea out there requesting this be checked by default so account teams aren't accidentally lost when not checked:
When assigning an account, it is not possible to lock the account
team: there is no control on the checkbox "keep account team", and no
API access around assignments. (note: maybe one can create an Apex
trigger for it, but it wouldn't change the UI of the assignment page)
Edit: Another idea here also states it is not possible to keep the account teams via API as you thought:
Allow Keep Account Teams and Keep Sales Team when changing owner via
API. Essentially, if we change the owner via the API we don't have
the ability to have the Keep Account Teams and Keep Sales Teams
checkboxes checked like you would if you manually changed the owner
via the UI.
Edit 2: After testing I also confirmed that the account team is kept when the account owner changes, in the workbench, in the developer console as well as during a jitterbit upload. I found a note at the bottom of the help sheet here that does make it sound like it's expected behavior.
After you change a record’s owner, the previous owner’s visibility
reverts to the default sharing setting unless that user is on an
account or opportunity team. For example, if the previous owner of an
account is on an account team, that user has Read Only or the access
specified in your organization-wide default for accounts, whichever is
greater. The previous owner’s access to related records remain the
same. This behavior is the same for opportunity owners that are
members of an opportunity team as long as you change ownership using
the API. When you change ownership of an opportunity within
Salesforce, you can select the access level you want.