This paper explores energy-aware joint optimization of beamforming and trajectory for integrated sensing and communication (ISAC) using an energy-limited unmanned aerial vehicle (UAV). Equipped with a uniform linear array of half-wavelength dipole antennas, the UAV transmits information-carrying signals to simultaneously serve downlink communication users and sense ground targets during its mission. Our aim is to maximize the accumulated sensing energy for the ground targets without violating the energy budget, while ensuring quality-of-service for the communication users by jointly optimizing the UAV's flight trajectory, ISAC beamforming, and mission completion time. The problem we address is inherently nonconvex and typically challenging to solve to optimality. Drawing inspiration from approximate dynamic programming (DP) methods, we propose a novel, computationally efficient solution by combining the one-step lookahead rollout algorithm from approximate DP with semidefinite programming techniques from convex optimization. Simulation results demonstrate that, when compared to two baseline schemes, our proposed approach significantly expands the achievable performance region for both sensing and communication.