Changing the database option in a proc seems like a very weird thing to do, IMO. And I'm not surprised that it isn't picked up by the proc. One aspect is how the plan is cached, but even with recompile in the queries, I'm not surprised if that is the case. And I doubt you'll find this documented anywhere.
So work with what MS wants us to use instead. In your case, since you only want it for the queries in this proc, use optimizer hints. Exactly whine one(s) depends on whether you need optimizer fixes, the cardinality estimator or optimizer enhancements. Or do trial an error. Anyhow, here are hints you can play with. Just search and you'll find out what each do and then you can use one or more accordingly: QUERY_OPTIMIZER_COMPATIBILITY_LEVEL_xxx, ENABLE_QUERY_OPTIMIZER_HOTFIXES, FORCE_LEGACY_CARDINALTY_ESTIMATION, 9481, 2312.
The numbers are trace flags, but they can be turned on at query level using the QUERYTRACEFLAG hint.