On_change_with on_change behaviour/capabilities One2Many relation

I would like to better understand how on_change_with and on_change work.

Does on_change_with_ of a One2Many allow to set values (Models) that do not exist yet? Does it require as a return a list of Ids?

I looked at invoice, taxes and I see that it does not use on_change_with, instead it uses a couple of on_change_, so I suspect that it can’t be done with on_change_with_ . Can the behavior of taxes (lines) in Invoice be achieved with on_change_with?

I would like to understand if on_change_with can be use or not in this situation and why. It seems like on_change gives a lot more control and freedom to perform side effects (on all the depend fields) on the Model. What happens if I do side effects (like change values of some fields) on the Model on a on_change_with?

The on_change_with*must always return the internal value of the field. So for One2Many, it is a list of ids.

Indeed on_change* are designed to be site effect. They depend on the order the user modify the record.