Thank you for your replies!
I went to the vet and she thought that his hemipenis what hanging there. My lizard kept on pushing them outside. They looked dry and she decided to bind a little thread around it so that this part would die. One part fell off. And she thought my beardie wouldn't use it anymore (he is 15 years old),
She calmed him with some medicine and looked at what is was. Turns out it was a lot of sperm that was stuck to his hemipenis! She and another reptile expert had never seen it...
She cleaned it and now he is fine.
I am now wondering how this could happen. The vet thought he might have been horny because of e.g. a female dragon, but I don't have another female dragon. Just a dragon in another cage in the same room that he can't see (I blocked the view). He does not bob his head and looks calm so I think the chance is small that the sperm happened because of the other dragon. (Or he is gay? lol) I simply dont know…