You’re comparing two different search terms. If you just want to search for the ticket number in Zammad, you should also user number: 12345
. It will return the definite result.
This behavior can have several reasons, a number combination that fits somewhere in the ticket text, IDs or anything like that. The full text search may provide more results some times because of that.