By rules as written, this is technically legit.
A bow is a ranged weapon. Weapons do not change what they are just because they are used in new and more interesting ways. Indeed, even thrown weapons, when thrown, count as melee weapons being used to make ranged attacks. (Are weapons with the "Thrown" property considered a "Ranged Weapon" for the purpose of sharpshooter?) In particular, the original (UA) version of the invocation in question says "..use any weapon you summon with your Pact of the Blade feature as a spellcasting focus for your warlock spells". It doesn't make it into a spellcasting focus. It just allows you to use it as one for warlock spells
An item used as a spellcasting focus is being used to cast a spell, and, by extension, used to make whatever effects that spell generates.
Witch Bolt is a warlock spell that can make use of a spellcasting focus, involves a ranged attack roll, and does damage.
Thus, by the rules, casting a Witch Bolt through a bow that you have summoned as a warlock will allow you to make use of sharpshooter.
...But it's really not worth it.
In order to pull off this combo, you need two specific invocations (one to give you the ability to use your pact blade as a spellcasting focus, one to let you summon a bow as your pact blade), and you need to spend a feat slot on something that (for you), realistically only does this one thing. That's expensive. You're also giving up having any sort of spellcasting focus that would give you a bonus to hit. If you're being at all reasonable about your eldritch blast optimization, you're going to be dumping your first invocation into Agonizing Blast, too. So, best possible case, you're playing a variant human (so you don't have to give up and ASI for that feat) and you get the whole thing online by level 5.
Worse yet, the set of spells for which this works is tremendously restrictive. It has to be a Warlock spell that involves a ranged attack roll and does damage, that has a material component. The material component in question must not have a stated cost. That means... well, it's pretty much just Witch Bolt at that point. Ice Knife and Acid Arrow would also qualify if you could somehow make them warlock spells. That's it. None of those are cantrips, which means that at best you're pulling this off 2-4 times per short rest, and Witch Bolt is a terrible spell, especially once you get to level 5 and have access to two attacks off of Eldritch Blast.
Basically, in return for your feat and two invocations you've managed to eke out a situational advantage to a slot-costing spell that by that point is outperformed by the standard cantrip plus one invocation that every warlock gets.
You might get lucky with a later book and find a spell that fit the above criteria and was actually non-terrible, but even if you did, it would likely have difficulty competing with Eldritch Blast.
Also, the rules here are unclear enough that this should be "ask your DM".
That having been said... 5e is explicitly and specifically not intended for "Rules as Written" play. Basically, any ruling that requires the level of legalism that my explanation involved cries out for DM adjudication. (An argument that hinges on the distinction between something that is a ranged weapon and something that's used as a ranged weapon? Really?)
Not that it matters. It's a terrible idea, and you shouldn't do it.