If I step up 9V to 12V with a boost converter, what happens when the input goes to 12V?
The output voltage is set by the feedback pin voltage, which in turn is set by a resistive divider. The regulator aims to ensure that the feedback pin stays at its comparative reference voltage (1.25V in this case) by adjusting the output voltage. Given that the reference is set by fixed resistors, then it is in principal entirely independent of the input voltage. That means if you set the regulator to 12V out, you will get 12V out regardless of whether the input voltage is 5V, 9V, 10V, etc.

However in practice things aren't so simple. The DC/DC converter will have input vs output voltage requirements that must be met. Those conditions will depend on the topology of your circuit (hence @Jodes question I presume).

If you wire up the XL6009 as a boost converter, the input voltage must be less than the output voltage for correct regulation. Conversely if you wire it up as a buck converter, the input voltage must be higher than the output voltage.

In order to work with both a 12V and a 9V input, you will need to use the buck-boost topology. This should allow the regulator to both step up the voltage if the input is lower than the required output voltage, or step it down if the input is higher (or equal).