Technically Mac OS should remember external display layout but can bug out on display ID changing or not being available quickly enough.
I haven’t tried displayplacer but it looks like something that might be worth checking out, especially notes on buggy displays in readme file. If command line is no go then I wouldn’t be surprised if BetterDisplay Pro didn’t have this kind of functionality since I don’t think there is anything display related this thing can’t do.