JPEGs built by the camera (including the embedded JPEGs) will have a lot of in-camera processing applied, including color, sharpness, noise reduction, and more. The RAW does not have any of that applied. When you are viewing the image before going into edit you are usually looking at the JPEG. Then, when the RAW loads, you are viewing the RAW. Each decoder applies some amount of improvement to the RAW, but it’s going to less (and different) from the camera. That is the cause of the shift.
Affinity Photo uses a different RAW converter – if they are actually allowing you to edit the RAW, then their rendition should have similar effects. It’s a different converter, so how they choose to render the RAW will be different (for example, they may apply more processing than Apple does).