This is honestly the best explanation I could find for Blackbeard’s double devil fruit.
Logia devil fruit users can become their respective element, but that transformation can be inhibited by the presence of something which naturally suppresses the element. Crocodile could be hit when he got wet, since sand clumps together when wet.
Enel could be hit by Luffy, since he is made of rubber.
Blackbeard cannot transform into darkness entirely, he can only create his element and project it (as all Logia users can), but his body can be hit normally even without Haki.
However, this is because in all situations there is light shining on him, which is the natural inhibitor of darkness… When he is under a curtain with no light, he can entirely transform into darkness and as his darkness can draw in Devil Fruit powers, he can then draw Whitebeard’s Devil Fruit power into himself.
*Theory by melted_Brain