I am currently working on exactly the same problem on exactly the same vehicle. Please let me know if you figure anything out. I will do the same. So far:
I bought the car (2004 Beetle TDI w/DSG) used and drove with zero problems for days except that lights seemed a little dim.
I changed the battery and the problem started.
Considered battery issue and changed for genuine VW 72 Ah battery from dealership.
Following low voltage thought, removed alternator and had tested by multiple pros who said it had no issues.
Maybe some settings need resetting or tweaking after battery replacement? Many people here say no, but the dealership, along with others, say that it does.
That is my next step. check settings and then check for shorted or weak wire between alternator and battery, under battery box, leading to trans, etc.
Flashing shift indicator (PRND123) and P0701 code.
Vag Com shows nothing but same code. Trans temp is normal. (Considered trans temp sensor issue found on later models)
Problem seems to come and go with no rhyme or reason.
Sometimes is perfect for only a minute and sometimes a week or more.
I am a mechanic but not very familiar with these cars yet.
I do, however, have someone helping me that is very familiar with them.
He has not, unfortunately, seen this particular issue before.