ChatClear+ is a simple Fabric mod designed to enhance the way servers clear chat messages, improving the normal method of flooding the chat with empty newlines.
Instead of seeing a bunch of newlines randomly and taking up some of the screen, you can directly ignore the newlines and clear when a certain amount of newlines have been met.
This is a 100% client side mod, so you don't need to be the server owner in order to install this.