To deactivate the users all their global permissions are removed, including any groups they are a part of which will completely remove their access to Bitbucket. Unfortunately at this time Bitbucket does not provide a way to deactivate users using their API. Please see BSERV-8817 for further details on this.