Yes, it is the same beer, but bottling it is different since the bottle has a very narrow neck so it is easy to move the oxygen and block this in the absence of this “poison” for the beer. On the other hand, the can has a very wide opening and it is more difficult to block this in the full absence of oxygen, so the beer’s oxidation process in the can is much faster than in any other type of container. As a result of this process, the beer tastes of metal or paper, which is why many people say that a can tastes like a can. Why are cans still used if bottles preserve better? They are easier to pile up, transport and store.
Another curious feature that makes these two formats different is that the bottle tends to have extra carbon dioxide, and the reason why is that although many directly drink from the bottle itself, the initial idea is to empty the content into a glass, and it is in this process when a small part of the carbon dioxide is lost. Nevertheless, cans are supposed to be used at the pool or beach or when going hiking, where you can drink directly from the container.