Domain‐wall energy in cobalt‐rare‐earth compounds