The 4th amendment protection against unreasonable searches is irrelevant, since it only relates to governmental searches. There may be "shopkeeper privilege" laws in your state that enable a detention. Ordinarily, you cannot be arrested by a person – that would be assault and false arrest. However, a state can enact an exception, such as Washington's RCW 4.24.220, which says
In any civil action brought by reason of any person having been
detained on or in the immediate vicinity of the premises of a
mercantile establishment for the purpose of investigation or
questioning as to the ownership of any merchandise, it shall be a
defense of such action that the person was detained in a reasonable
manner and for not more than a reasonable time to permit such
investigation or questioning by a peace officer or by the owner of the
mercantile establishment, his or her authorized employee or agent, and
that such peace officer, owner, employee, or agent had reasonable
grounds to believe that the person so detained was committing or
attempting to commit larceny or shoplifting on such premises of such
merchandise. As used in this section, "reasonable grounds" shall
include, but not be limited to, knowledge that a person has concealed
possession of unpurchased merchandise of a mercantile establishment,
and a "reasonable time" shall mean the time necessary to permit the
person detained to make a statement or to refuse to make a statement,
and the time necessary to examine employees and records of the
mercantile establishment relative to the ownership of the merchandise.
Speaking of Walmart, here is a petition regarding a lawsuit against Walmart over such an event, where a shopper failed to stop to respond to exit security, resulting in her being physically stopped. A lawsuit (assault, unlawful imprisonment, outrage) ensued. The bottom line was that the shopkeeper's privilege is a valid defense against a lawsuit to the effect that a shopper does not want to comply with a request to prove that they are not stealing goods.