A U.S. citizen cannot avoid U.S. federal capital gains tax by leaving the United States. Capital gains tax applies to U.S. citizens regardless of their location of residence worldwide. Renouncing U.S. citizenship will invoke the exit tax, and the U.S. citizen will owe capital gains tax on all assets they own as if they sold them on the day before they renounce.
If a U.S. citizen can receive a lower capital gains tax rate by moving to Puerto Rico, that would be a clear advantage. However, as answers on related questions mention, the savings would only apply to appreciation after acquiring Puerto Rican residency.
Thus, the advantages of moving to Puerto Rico would be to avoid the requirement to relinquish U.S. citizenship, avoid paying the corresponding exit tax, and receive lower capital gains tax treatment on appreciation *after* residency.
Advantage of moving to a foreign country with no capital gains tax (e.g. Singapore, Panama) and relinquishing U.S. citizenship would be to receive a 0% capital gains tax rate on appreciation *after* renunciation; with the huge disadvantage of paying the exit tax and losing U.S.citizenship.