Questions before reflash an XA2

I’m going to reflash my XA2 Ultra in order to possibly get rid of some issues as reported in other threads. I flashed SFOS on top of Lineage 18.1 (i.e. Android 11) without downgrading it to Sony’s stock Android, and maybe that’s what causing some issues, so this time I would like to do it strictly as it should be. So the question is:

in Emma tool both Android 8 (the one the XA2 Ultra originally shipped with) and Android 9 (then released as an update) are available for XA2 Ultra. So, before reflashing back to SFOS, should I flash Android 9 right away, or Android 8 and then upgrade it to 9, or just Android 8 and then SFOS, without ever upgrading to Android 9? In other words, which Android version is the best and least problematic “base” for SFOS on XA2 Ultra Dual Sim?