Yes, Canada has invested money and resources into the F35 project and that money will be wasted if we abandon it.
But let’s not throw good money after bad. In economic terms, the money we’ve spent is called a “sunk cost” - meaning that it’s gone. We shouldn’t consider that lost money when deciding what we need to do in the future.
Our country’s defence does not require astronomically expensive fighter jets. And we certainly cannot rely on a country who is threatening to conquer us to supply us the tools to defend ourselves.