On the STM32L431, there's an erratum described in STM32L431xx Errata sheet (STM32L431xx device limitations / DM00218224). It allows to reset COMP1 and COMP2 despite of the LOCK bit being set.
My question: What happens to an I/O pin that is connected to the COMP's output via the alternate function multiplexer / GPIOx_AFR? Will it switch to a defined state? If so, to which state?