I'm dual UK/Swiss and pre-Brexit used to use a random passport exiting and entering Switzerland and/or the UK. A couple of years ago, when Brexit came into real effect, when leaving GVA on a flight to the UK I showed the immigration officer my UK passport. After much scratching of head and fumbling of passport, I explained I was a dual national and showed him my Swiss id card. He explained that the problem was that he couldn't find an entry into the Schengen zone on my UK passport and that in future all entry and exit into or from Schengen should be on more Swiss passport.
I had the inverse problem returning to Switzerland from the UK, where I couldn't checkin because the computer said "no". The agent explained that my API was for my British passport, I was shown as resident in Switzerland, but didn't have a resident's permit. It took quite some tapping at the keyboard to override the "computer says no". On subsequent trips to the UK, I travel to the UK with UK API and whilst in the UK change the API to Swiss for the return trip. So far that has worked flawlessly.