RH says there is a bug in logrotate w.r.t. compression when special conditions are met, one of the conditions is sharedscripts statement.
So logrotate might not behave as documented in the end.
Affected systems are RH 7 to RH 9 at least.
Article is here: https://access.redhat.com/solutions/7100229
It is for RH subscribers only, so I am reluctant to copy/paste from article.
One can get access to the article by subscribing to free RH developers program.