Abstract—Ubiquitous connectivity is vital for emerging appli cations like extended reality, factory automation, and robotics, necessitating low latency, high data rates, and reliability in both downlink and uplink. From the network protocol perspective, successfully supporting these new use cases hinges on the network being resilient enough to address the heterogeneous demand in dynamic channel conditions. To assess the performance of legacy 5G networks for these applications, we focus on the physical (PHY) layer and analyze the existing 5G time division duplexing (TDD) method in terms of throughput. Our preliminary experiments with 3rd Generation Partnership Protocol (3GPP) compliant Matlab 5G toolbox reveal limitations of the fixed config uration of the PHY frames, that are typically used by commercial 5G networks, hindering adaptability to heterogeneous demands and compromising quality of service (QoS). To overcome this, we propose a machine learning-enabled optimization framework facilitating proactive PHY frame reconfiguration based on real time prediction of wireless channel metrics computed at User Equipment (UE). Implementation and validation of our approach on the 3GPP-compliant Open Air Interface (OAI) 5G testbed demonstrate the practicality of our solution and its adherence to 3GPP standards. Overall, our dynamic PHY frame configuration approach consistently meets overall traffic demands better than any fixed configuration across various scenarios, while also having the lowest percentage of un-transmitted bytes in each scenario