@Kacper Gnabasik, Thanks for posting in Q&A. In General, Intune settings are based on the Windows configuration service provider (CSPs). The behavior depends on the CSP. Some CSPs remove the setting, and some CSPs keep the setting, also called tattooing.
For example, if you remove the E3 license from a user, the device security policies deployed through Intune will still remain on the device.
However, to ensure the device can be managed by Intune, each Intune license for each user is recommended.
Hope the above information can help.
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.