So how reliable is this nowadays ...
Without looking at recent papers but just based on how machine learning works in general: there is no generic authorship detection method which fits all possible use cases. Instead what is possible depends a lot on the specific use case and on the available data.
If the use case is to determine the author from a group of 10 possible authors and you have sufficient training material the detection is to be expected very reliable. If you want to detect instead who of 100000 people was the author I expect it to be impossible even with sufficient training material. But you might at least be able to narrow down the field of potential suspects to a few 1000. Only, in many cases you will not have enough training material even for this.
On the other hand if the author has a very unique style of writing it makes it again easier to detect it. Or in other words: it is far easier to associate some good written essay with J.K.Rowling than the usual average quality essay with some specific 14 year old kid.
It also depends on the kinds of text: a book is different from an article in the newspaper is different from an email is different from a twitter message. Not only the length differ but also the amount of time which was used to improve and tailor the wording and style. It is probably easier to detect authorship of books than of emails since the authors unique style is more clearly reflected within the book.
I'm at least familiar with recent research where machine learning was used to determine if a specific email was authored by the claimed sender in order to detect sender spoofing or account takeover. In this case even with a large corpus of previous mails the false positive rate was very high.
... what would be appropriate measures to take against it?
Again this depends on the use case. But similar to transferring the style of images or of music or creating deepfakes it is possible to use style transfer with texts in order to hide the real author or even fake a specific author. And of course making only few data available for training helps a lot too.
Anyway, I think in most cases authorship attribution will not be done based on the writing style but on the contents of the text. Especially in case of government critics or whistleblowers these texts usually contain information only few know in this detail - because otherwise these texts would usually not be seen much as a problem. Thus the focus of investigation will be to find out who has this particular knowledge or had access to specific leaked information.