At least some of the comments I posted on Medical Sciences SE since Nov 25 disappeared - there is no mention of them being deleted, and I'm sure I haven't deleted them. Is there some function where this happens automatically?
There are a few situations where comments are useful, such as improving the clarity of questions/answers, providing transient (i.e. non permanent) information, etc. Comments can be deleted by owners, moderators or the system if it is flagged enough. Comment chains can also be moved to chat if that is deemed warranted.
From the Stack Exchange Meta on commenting:
When should comments be deleted?
Comments are temporary "Post-It" notes left on a question or answer. You should not expect them to be around forever. Once a clarification has been made, an edit added to the post to include new information, or the issue in the comment is otherwise resolved, it can be deleted. Additionally, any comment that violates the comment guidelines listed above or the Code of Conduct is subject to deletion.
In reality, on most sites, many since-obsolete or guideline-violating comments don't end up being deleted due to the high volume of comments posted, but this does not mean that they can't or shouldn't be deleted in the future.
If you encounter a comment that has since become obsolete or that violates the commenting guidelines above or the Code of Conduct, you can flag it for deletion.
If you believe it was deleted in error or still provides some use, you can link to the question and it can be looked at again.
Is there some function where this happens automatically?
No, there is no script comments that automatically remove comments (unlike questions, which are removed automatically). Comments are manually removed by moderators. Personally I find it very disrespectful that deleted comments can't be accessed by the authors and that SE lacks a convenient way for mods to give some reason for comment deletions.