Hi @ptillisch,
Thanks a lot for your reply. Your solution does (kind of) work.
I am able to upload my sketch. However, I am able to upload only once. When I upload it the first time, I select a port called Arduino Envie M7[0101] - while using this port I get the same "DFU" error and the port disconnects after attempting to upload. When I try to upload the second time, a port called Arduino Portenta H7[0200] replaces the previous "Arduino Envie M7[0101]" port. With this port, I am able to upload but it also disconnects after uploading.
So basically, I am able to upload every even iteration(eg 2nd, 4th, 6th time).
Would you know of a way to modify this, such that I can upload every iteration ?
Note: The vendor ID and device ID of both the products are the same