Article 38 requires the DPO to be involved properly and in good time, supported with resources and access, and free from instructions concerning their DPO tasks. The DPO reports directly to the highest management level and must not be dismissed or penalised for performing those tasks. Other tasks are allowed if they do not create a conflict of interests.
Source: GDPR Article 38.