Try cleaning the switch first.
If it doesn't help,I am very afraid the problem probably is in the windshield motor..Exactly like this or sometimes the auto retract didn't working or when you rise it up it didn't goes down,happening and to me..Αfter a detailed search and info from many others confirmed that all these odd gremlins due to the black box on the motor where there are a problematic microswitch.Yamaha knows the problem and now they sells a new part number motor..Have a look:
Old part number 5jw-83306-00
New part number 5jw-83306-01
https://www.cmsnl.com/fjr1300rrc-2003_model11122/5jw-83306-01-drive_5jw8330600/
A post from their website:
What are Superseded Parts?
Commonly parts are superseded by a newer version of the item with main reason being quality improvement.
Please note that the actual shape or colour of the item may slightly deviate from the original design.
If you definitely do not want to receive any superseded items, simply do not order these.
You can identify an item being superseded by studying the product details. If you are unsure if an item is superseded, please contact our
sales team for assistance.
Ps.
The bad thing is that this motor cost over of 500$
And if someone will buy it from e-bay,99% he will buy the old part number with all these troubles...
Ps 2
All these troubles with the windshield motor are very common almost in all 01/-05 Gen 1 bikes..I think the admins should to pin it somewhere..