That is different than fiction writing (which is what I am discussing). If there is a good reason for the passive voice to be used...then by all means... it should be used.
If the author embeds science writing in his novel it should sound grammatically authentic. It’s not just a rule, it’s a maxim.