Essentially yes… temporarily, at least. Changing your IP address is like moving a target around the range. Without direct “line of sight” to your computer, the attackers won’t be able to hit you. At least, not for a while. If your computer comes in contact with the attacker again, if they find your new IP address, the attacks will probably resume. This might happen if the attacker plays the same game as you a lot, or if you’re in the same peer-to-peer voice chat app, or other situations like that.