Probably the color for parent tasks is coming from the project color.
Subtasks are not actually members of the project so unless you do Tab+P and add them to the project (with the side effect that theyâll also appear in the main tasks list, though you can âhideâ them in a collapsed Section, they wonât have the same color.