Integrated sensing and communication (ISAC) is a promising technology for next-generation communication systems, allowing concurrent data communication and positioning. However, in the presence of blockages, ISAC does not guarantee accurate positioning due to the lack of echo signals from targets. To address this issue, we study a downlink ISAC system with an unmanned aerial vehicle (UAV) relay that decode-and-forward data signals while securing blockage-free paths. In this UAV-assisted downlink ISAC system, we aim to maximize the sum rate while ensuring a target positioning accuracy by optimizing transmit power allocation. With moving target objects in a three-dimensional (3D) environment, this optimization problem becomes non-trivial due to complicated object positioning state transitions. To relax this complexity, we derive an approximated state transition model of 3D object and thereby formulate a strictly convex optimization problem that guarantees a unique power allocation solution. Numerical results corroborate that the proposed power allocation outperforms the baseline with feedback-based beam training in terms of the achievable sum rate.