Hi,
When you use Data collection rules where the data is send (to which Log Analytics workspace) is defined withing the DCR. What you need to do is assign the DCR to the VM:
Azure Monitor agent on the VM will read the configuration, collect the data and send it to the workspace defined in the DCR.
Note: DCRs use Azure Monitor agent, not Azure Log Analytics agent (legacy).
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.