Both the latest iPhone and the Google Pixel 9 can be tracked when nominally powered off:
https://arstechnica.com/information-technology/2022/05/researchers-devise-iphone-malware-that-runs-even-when-device-is-turned-off/
https://www.androidcentral.com/apps-software/android-15-could-allow-devices-to-be-tracked-even-when-switched-off
The government has had the ability to track nominally powered off phones since at least 2006:
"In 2006, it was reported that the FBI had deployed spyware to infect suspects’ mobile phones and record data even when they were turned off. The NSA may have resorted to a similar method in Iraq, albeit on a much larger scale by infecting thousands of users at one time. Though difficult, the mass targeting of populations with Trojan spyware is possible—and not unheard of. In 2009, for instance, thousands of BlackBerry users in the United Arab Emirates were targeted with spyware that was disguised as a legitimate update. The update drained users’ batteries and was eventually exposed by researchers, who identified that it had apparently been designed by U.S. firm SS8, which sells “lawful interception” tools to help governments conduct surveillance of communications."
https://slate.com/technology/2013/07/nsa-can-reportedly-track-cellphones-even-when-they-re-turned-off.html
If you want to ensure that the phone is not tracking you, take out the battery and/or place it in a faraday bag.
https://arstechnica.com/information-technology/2022/05/researchers-devise-iphone-malware-that-runs-even-when-device-is-turned-off/
https://www.androidcentral.com/apps-software/android-15-could-allow-devices-to-be-tracked-even-when-switched-off
The government has had the ability to track nominally powered off phones since at least 2006:
"In 2006, it was reported that the FBI had deployed spyware to infect suspects’ mobile phones and record data even when they were turned off. The NSA may have resorted to a similar method in Iraq, albeit on a much larger scale by infecting thousands of users at one time. Though difficult, the mass targeting of populations with Trojan spyware is possible—and not unheard of. In 2009, for instance, thousands of BlackBerry users in the United Arab Emirates were targeted with spyware that was disguised as a legitimate update. The update drained users’ batteries and was eventually exposed by researchers, who identified that it had apparently been designed by U.S. firm SS8, which sells “lawful interception” tools to help governments conduct surveillance of communications."
https://slate.com/technology/2013/07/nsa-can-reportedly-track-cellphones-even-when-they-re-turned-off.html
If you want to ensure that the phone is not tracking you, take out the battery and/or place it in a faraday bag.

