I found a solution by adding the wp-social-locker plugin and locking the downloads with a shortcode.
To do so I changed the file attachment from ID-based to manual shortcode.
-
Sample for a locked file in an article:
[sociallocker][wpfilebase tag="file" id=1 /][/sociallocker]