I would like to indicate that the search also takes place in the content elements that have been marked as draft. I don’t think this should be the case, or at least a switch should be set to work only in the published content.
To be honest, I don’t see this as a bug. If at all as a “feature request”, whereby the question of why remains. When you search for posts in the WordPress dashboard you also have no toggle and all results are returned, regardless of their status.
Thanks for the reply. They are glad that it is not a mistake, but I spent a whole day looking for the reason why an item that I did not expect appeared in the search. Moreover, neither the title nor the content part (excerpt) appeared for these elements, only the modification date. Of course, I did not find these dates among the published content.