I was wondering about this and found this fabulous You Tube video about how to use the metal key to enter the car and how to place the fob in the location for the car to recognize it and to be able to start the car with the dead battery fob. This video shows a different model than the XC40, but it's the same information. Our fob location is inside the arm rest, behind the trash can (there is an image of a key there, which is difficult to see, but if you remove the trash can it's easier to see). I'm sure this information is in the owners manual, but I found it much easier to watch how its done.When the battery in the keyfob dies you can always use the app to unlock the door. But if the fob is dead, you probably can't start the car unless you use the backup fob.
Same with our 2021 XC40/Momentum T5We have one black and one orange fob. Both have keys inside.