The invisible/ghost units can be detected and damaged by turrets and I believe other automatic targeting gadgets. However, player's weapon doesn't do anything to them. I have recorded my second encounter of these ghosts, please check out this link:
https://www.youtube.com/watch?v=a4HD13qo_Yo&t=1s
At around 4:50 you can see me deploying the turret, and the turret starts to attack one of the ghosts, I follow its tracking and starting shooting where it's pointing at, but my gun damage didn't register. You can only see the damage dealt by my turret (damage number 36104, if it were my weapon, it would be over 2 million)
Hope that provide more information for your investigation.