The magnetic shield is only going to be one component of a protective system for an interstellar (or even interplanetary) ship.
As you note, the magnetic field will repel charged particles but uncharged particles will slip through the field. A magnetic field might be useful for protecting a ship against uncharged particles if it is being used to shape and hold a cloud of plasma around the ship. A plasma generator onboard can be used to "inflate" the magnetic field (making it larger and covering a greater area, while incoming particles will interact with the plasma. Since the plasma will be moving at high speed relative to the particles, very small particles like dust will most likely be vapourized, and the energy might be sufficient to ionize the particles and allow the magnetic field to displace them.
This is something like a Mini-Magnetospheric Plasma Propulsion (M2P2) system except that instead of allowing solar wind to push the plasma bubble, it is "anchored" to the moving ship and being used to push particles out of the way.
Of course this only works for very tiny particles. The ship should still have a wake shield to absorb the impact of larger particles that slip through the magnetic field and plasma. IF the ship is moving at relativistic velocities, the problem is even molecules of hydrogen will be impacting with massive amounts of energy. The wake shield may have to be a solid or laminated mass of ice several metres thick.
If the ship is powered by a light sail, then the laser itself can be used to carve a path head of the ship. The beam simply has to be fired along the path of the ship (this can be done during the testing phase) and the energy will have the potential to push a good fraction of the dust and gas out of the way, prior to the launching of the ship itself.
So you will have a multiple set of tools for your ships protection: shining the launch laser ahead of the launch to clear a path, using a powerful magnetic field to move charged particles out of the way and hold a plasma shield in place, and a solid ice wake shield to absorb the impact of anything which gets past.