Should you include issue IDs in your commit messages?

It's shown in the examples of the conventional commits specification as part of the optional footer data.

But is it useful?

It can be if your issue tracker is linked to your Git repository and you can click the issue ID in a commit message and see the issue.

But, how often do teams change issue-tracking software or the project is passed to a different company that uses a different issue tracker?

That makes the issue IDs that reference the old IDs useless as no one has access to the issues it references.

I'd recommend putting as much information in the commit message itself and not relying on it being in an external source, like an issue tracker.

The Git log and commit messages will remain even if a different issue tracker is used, or a different team starts working on the project, and that additional information isn't lost.

I'm not against putting the issue ID in the commit message but don't do it instead of writing a descriptive commit message.