Beamforming Design and Trajectory Optimization for UAV-Empowered Adaptable Integrated Sensing and Communication