Affinity Photo does stack and retouch astrophotography data in a fully linear colour space. Hopefully this video helps to explain why your data may look non-linear, but is in actual fact being processed with linear compositing.
If you want to try the astrophotography macros for Affinity Photo, they're a free download from my website: https://jamesritson.co.uk/resources