As wireless local area network (WLAN) devices become more prevalent in various environments, the IEEE 802.11ax standard (Wi-Fi 6), released in 2021, aims to improve the spectral efficiency. The overlapping basic service set (OBSS) packet detection (PD) based spatial reuse (SR) scheme is a main technology for this purpose which can increase channel access opportunities by adjusting parameters. However, the standard only provides boundary values for parameter adjustment and does not provide details on how to optimize the performance, which can lead to a performance degradation. The IEEE 802.11be standard (Wi-Fi 7), established to satisfy extremely high throughput (EHT) demands of next-generation applications, includes the OBSS PD based SR scheme and the coordinated spatial reuse (CSR) scheme to maximize area throughput in dense networks. The CSR scheme optimizes the transmission performance through coordination between access points (APs), which results in additional signaling overhead and protocol complexity. In this paper, an enhanced SR scheme named optimized transmission power based OBSS PD (OTOP) SR is proposed to achieve high throughput in dense networks. The OTOP scheme enhances the parameter control operation of OBSS PD based SR to take advantage of its distributed nature which keeps the signaling overhead and protocol complexity low. The OTOP scheme derives the optimal transmission power that can maximize the transmission success probability of WLAN devices based on stochastic geometry analysis. The simulation results show that the proposed OTOP scheme performs better than the existing SRGM and OBSS PD based SR schemes in terms of throughput, frame error rate, and fairness.