Lets say I file a provisional patent at December 2020 with claim A. Some company B decides to file a application for non provisional patent with the same claim A at January 2021, because my provisional is not searchable by neither the patent lawyer nor the patent examiner, so company B's non provisional patent application got granted.
Lets say at June 2021 i want to turn my provisional patent into non provisional patent since the one year window is soon expiring.
Could i still file a non provisional patent with claim A and still get it granted? If the answer is yes, does that render company B's non provisional patent useless? If yes, does that means company B just wasted a ton of money for nothing?