In high-temperature cuprate superconductors, stripe order refers broadly to a coupled spin and charge modulation with a commensuration of eight and four lattice units, respectively. How this stripe order evolves across optimal doping remains a controversial question. Here we present a systematic resonant inelastic x-ray scattering (RIXS) study of weak charge correlations in La2-xSrxCuO4 (LSCO) and La1.8-xEu0.2SrxCuO4 (LESCO). Ultra high energy resolution experiments demonstrate the importance of the separation of inelastic and elastic scattering processes. Upon increasing doping x, the long-range temperature dependent stripe order is found to be replaced by short-range temperature independent correlations at a critical point xc = 0.15 distinct from the pseudogap critical doping. We argue that the doping and temperature independent short-range correlations originate from unresolved electron-phonon coupling that broadly peaks at the stripe ordering vector. In LSCO, long-range static stripe order vanishes in a quantum critical point around optimal doping.