Rinse and pat the whole chicken dry; season cavity and skin lightly with salt and pepper.
In a bowl, whisk pineapple juice, soy sauce, brown sugar, ketchup, vinegar, ginger, garlic, vegetable oil, sesame oil and red pepper.
Reserve 1/3 cup of the sauce for basting. If you prefer a thicker glaze, simmer the reserved sauce and stir in the cornstarch slurry until glossy.
Place chicken and remaining marinade in a large zip-top bag or container and refrigerate for 2–8 hours, turning occasionally.
Preheat grill for indirect medium heat (about 350°F/175°C) or oven to 375°F/190°C with a roasting rack.
Remove chicken from marinade, pat lightly, and place breast-side up on the rack. Tent with foil for the first 20 minutes if roasting.
Cook the chicken, basting every 10–15 minutes with reserved glaze to build a sticky coating and ensure even caramelization.
Rotate the chicken as needed for even cooking; aim for an internal temperature of 165°F/74°C in the thickest part of the thigh without touching bone.
In the last 10 minutes, brush with a final generous layer of glaze and move briefly to direct heat if grilling to caramelize—watch carefully to prevent burning.
Remove the chicken and let it rest 10–15 minutes before carving so juices redistribute; garnish with scallions or parsley and serve.