OK, to add more.
My Forscan test showed P0504. Brake Switch A/B correlation code.
To set that code means one of the brake switch switches that should be engaging when you hit the brakes - is not changing status.
You know the Brake light works, but have you ever tested to see how far down the pedal needs to be pressed to make that light come on?
Why?
- Because if the brakes get applied and slow the car down, (how) does the engine know?
- There used to be a subsystem that looked at the change in the brake light and controlled Cruise control and even affected the emissions like EGR to help with rich fuel conditions to ventilate the system.
- Ford forked off this concept to use it also as a means to provide access to this change in status to help with Cruise Control and also added Hill-Assist - they used a separate switch to control these systems or features.
- So if the Pedal gets pressed, does it travel far enough to make it's plunger change the status of the other switch to change it's status so the system knows your using your brakes?
- Can the Brake pedal, when released, retract far enough so the plungers throw is far enough to tell the system their change in status? If the car is started and the plungers are not seating - the system sees a result so it will try to compensate for this - during the drive cycle you might not have cruise control or it will notify you that the Hill-assist is not working System Malfunction - Service Now messages appear because it can't figure this one out.
- IT can set that code from not seeing any change in status because you don't need to press the brake pedal down far enough to make that other switch plunger move (or throw) far enough to change it's state. You can brake normally but the other plunger is not moving (it's throw) far enough to make or break contact
- That may be from the plunger is stuck, dirty switch or it's dying on you or the aspect between one plunger and the other are too extreme in operation for the system to operate safely.
- This can cause the Cruise Control - Hill Assist and ABS/Trac-Control to work erratically or not at all because of one switch is either stuck or the pedal doesn't travel far enough to move the plunger far enough to change the condition from on to off - Off to on and back again. So it will disable these features until it's fixed
I have to tell this in this post so others whom may encounter this problem will know what is going on...it's not against you - it's a LEGACY post to help others later.
I reviewed your picture, there's little out of the ordinary to see except to know that the switches are properly seated - but one switch - the
Blue one, seems to have a rear bulge - the upper white portion where the connector goes, on that body is extended above the seal of the blue side - leaving a gap. This may put the switch in a condition where it can't seat the switch to make full contact. There are supposed to be tabs on the connector contact body that seat on the blue openings - I don't see them fully seated in the window for those tabs on the body.
Look at the post with the brake assembly removed.
Might want to investigate your Blue switch - it seems it's tabs and notch are not fully seated
Since it looks at electrical - the mechanics are OK, the contact may be too dirty or have just enough resistive or higher-ohmic contact result for the system to see any change by power thru those switch contacts. This change in height can do this - get another switch.
- Also note too, the Plunger of the Blue one is slightly more extended - that is where an old adjustable crescent wrench's gap, set thinly - can offer a means to bend the paddle to make the plunger seat better. You place the wrench jaw on the flat and gently pry up or down on the paddle - you press on the Brake pedal to pull the paddles away so you can fit that jaw on the flat to pry it up or down to adjust aspect. You can also adjust the seated flange to some degree to help with both the retracting of the brake pedal for releasing the brakes and setting trigger point for both switches at the same time.

When the Brake light works, that is a redundant system - but the other switch is also controlling the ability to handle Cruise Control and the effort of starting the car when the clutch pedal switches (it also has two one at the top of the pedals rest stopper and the other one is at the full bottom of when you push in the pedal to shift gears). You don't seem to have any problems with those - you can start the car so those switches work and seem to be OK.
Otherwise, the redundant part of the system that is not integrated with Brake, is for turning off the Cruise Control - that other switch does the job for you. When you tap on the brakes the light may work but the other plunger is not sending any change to the system, so the BCM sees Brake pedal - but it can't see any change in the other switch