One way to do it is to archive[0] it which will move it into a local _archive file.
Another way which I'm currently using is to periodically manually archive tasks into a tree of folders and files by date then category (and sometimes subcategory) which allows me to publish an HTML or PDF file of everything from say 2023 for a particular client.
(setopt org-agenda-skip-scheduled-if-done t)Perhaps to clarify: hide from where?