The example with the railgun isnt right I think. Close combat then the units take damage at both sides. With planes attacking a group, the planes also takes damage. But units as Artillery and railguns, light cruisers and battleships dont take damage when attacking from distance.
https://bytro.helpshift.com/hc/faq/
At this place you can find new updates and changes