It may be a bit difficult to buy a backpack that is really waterproof and suitable for swimming.
Please mind the difference between water-resistant items and water-proof items. Water-resistance is ability to resist the penetration of water partially, but not entirely.
- IPX6 means that item is water resistant. This standard protects against water stream, but not against water immersion or submersion.
- IPX7 standard protects against water immersion up to 1 meter of water for up to 30 minutes. But still, it does not protect against water submersion.
- IPX8 standard protects against water submersion. Items can resist a low pressure, so they can't be submerged too deep.
- IPX9 standard protects against water submersion and even against higher pressure.
I would say that IPX8 or IPX9 backpack should cover your needs and protect your stuff when swimming on the water (not under water). After you buy a waterproof backpack, first, I recommend to put some non-expensive stuff inside to test it.