Enhancing THz/mmWave Network Beam Alignment With Integrated Sensing and Communication