The ability to confront new questions, opportunities, and challenges is of fundamental importance to human progress and the resilience of human societies, yet the capacity of science to meet new demands remains poorly understood. Here we deploy a new measurement framework to investigate the scientific response to the COVID-19 pandemic and the adaptability of science as a whole. We find that science rapidly shifted to engage COVID-19 following the advent of the virus, with scientists across all fields making large jumps from their prior research streams. However, this adaptive response reveals a pervasive pivot penalty, where the impact of the new research steeply declines the further the scientists move from their prior work. The pivot penalty is severe amidst COVID-19 research, but it is not unique to COVID-19. Rather it applies nearly universally across the sciences, and has been growing in magnitude over the past five decades. While further features condition pivoting, including a scientists career stage, prior expertise and impact, collaborative scale, the use of new coauthors, and funding, we find that the pivot penalty persists and remains substantial regardless of these features, suggesting the pivot penalty acts as a fundamental friction that governs sciences ability to adapt. The pivot penalty not only holds key implications for the design of the scientific system and human capacity to confront emergent challenges through scientific advance, but may also be relevant to other social and economic systems, where shifting to meet new demands is central to survival and success.