After the application is closed, the value I copied to the clipboard disappears. However, it works correctly when the application and file are open. I couldn't find any settings regarding this. Copy and paste text is a feature I use a lot.
That is nothing Kate can control. If you use Plasma, there is the clipboard history in the panel that allows to configure stuff.