I added a new State for the Country 'Canada' in Setup -> State and Country/Territory Picklists. The State is 'BC' and StateCode is 'BC2'. See the image below for how it looks:
Now that 'BC' is a valid State, I should be able to update an address field with the State = 'BC' but I am getting the following error:
First exception on row 0 with id 00Q1b000004oxi1EAA; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: State/Province: [State]