@Francesco Gatto,Thanks for posting in Q&A.
From your description, I know you have created a policy to set lock code for Android device but get some error.
To clarify this issue, please share with us the following.
1.Could you let us know how the devices enrolled in Intune? Are they both Android Enterprise Fully managed? Or other enrolment methods?
2.Due to Q&A only support English, could you please provide the screen shot of the configuration policy in English?
3.How do you assign policy for previous enrolled device and new enrolled device?
If there is any update, feel free to let me know.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.