I had this very baffling issue in iTunes. This probably applies to both macOS and Windows, but I haven't tested both... anyway, if you find AirPlay seemingly constantly engaged and playing to other devices than what you wanted, the reason this is happening is that iTunes has gotten confused about the AirPlay state. To fix this, make sure there's nothing playing, and find the AirPlay icon in the iTunes toolbar. Click it and select whatever device it's been playing to (even if that's already selected). Then select the desired device. That will set the state to what it should be.