Wearing bodycams is generally a decision made at a local department by department, or agency by agency basis, as a matter of policy, although there are five states that require them statewide (CA, CT, FL, NV and SC). About half of the states require agencies that use them to have written policies concerning their use but don't necessarily establish what those policies must be:
Nineteen states and the District of Columbia require written policies
in order for law enforcement to use or receive funding for body-worn
cameras. Legislation sets statutory minimum standards for policies,
requires state entities to write or coordinate the development of
policies and charges individual departments with creating their own
policies. Maryland’s law, for example, requires the Police Training
Commission to develop and publish a body-worn camera policy that
addresses when recording is mandatory, when it is prohibited, how to
handle access for review, retention standards for recordings and
consequences for officers who violate the policy or alter recordings.
Texas’ law requires individual departments to have policies that
include a data retention period of at least 90 days, procedures for
officer access to recordings and reporting requirements for
documenting equipment malfunction. The law also prohibits any policy
from requiring that officers film their entire shift. South Carolina
requires departments to submit their policies to the Law Enforcement
Training Council for approval. Utah’s law requires agencies using body
cameras to mandate in their policies that officers wear them while
executing search warrants.
In addition to state laws there are also "invisible" pressures to adopt bodycam policies from insurance providers for law enforcement agencies that increase the premiums of some agencies, especially those with a history of claims that don't adopt better policies.
I am not aware of any such jurisdiction that requires bodycams for undercover officers at it would generally blow their cover unless it is a "wire" type hidden camera used for a particular event to create evidence rather than to document potential misconduct.
A department or agency could make such a policy, but I am not aware of any serious effort to do so.
"Plain clothes" officers aren't necessarily "undercover", however, and I don't know whether there are any bodycam requirements for them. The usual idea is that "Plain clothes" officers are less prone to be in the exigent, confusing, physical situations for which bodycams were seen as a solution, and a non-undercover Plain clothes officer might still have a service provided vehicle with a dash-cam.
One survey of body cam policies of a semi-representative sample of agencies that I've seen doesn't address this particular issue, and many agencies aren't even very clear about when an officer has to record (including Denver, where I live).
Even if a law enforcement agency does have a policy, the fact that the officers didn't follow it is usually just something that can be mentioned by defense counsel in a criminal defense case (through an appropriate witness), and this doesn't always confer affirmative legal rights upon people who deal with policy (public access rights to bodycam footage varies greatly).