Thanks for your reply. The input to the Generator has .requires_grad set to false.
I calculate the loss for the Discriminator output. .backward() creates the gradients for this model, but not for the generator which outputs the input for the Discriminator.
Let me give you some more details about the data processing:

The sequences I input into the model are encoded.
Based on these encodings the embeddings are created inside the generator
The outputted data is ‘decoded’ again using the former character-encoding mapping; this is done as I give both the output of the generator and some encoded target sequences into the Discriminator; these target sequences do not pass through the Generator which means they are not embedded.
In the Discriminator sequences are again embedded

I noticed that the output of the Generator has requires_grad set to true. When I transfer the data to the original encoding requires_grad is set to false. But I am not sure if this is the problem.