Technically possible. Do note, though, that getting a solar cell to produce its nameplate capacity is much harder than doing the same with a fossil fuel generator.
The specific claim ("nearly 4,000 GW of solar capacity") in the article comes with a link to the 2020 article "Hybrid floating solar photovoltaics-hydropower systems: Benefits and global assessment of technical potential" by Nathan Lee et al..
The article states:
Technical potential capacity (MW) is the product of the power density
(assumed to be 1 MW per hectare or 100 MW per km2 10 ) and total
suitable land area (Equation 1) . To assess the annual generation
(GWh per year) we find the product of the capacity, the
corresponding solar energy resource capacity factor, and 8,760
hours per year (Equation 2). The corresponding capacity factors were
identified from the Global Solar Atlas (downscaled to 100 m x 100 m
resolution with a simple nearest neighbor method).
To explain the calculation of technical potential, we present a hypothetical example
of a waterbody with an area of 1 km2 . We assume that 10% (for this
example) of the total waterbody area is suitable for FPV (Figure 4 and
Equation 1) or 0.01 km2 . With an FPV power density of 100 MW/km2 ,
we find a potential capacity of 1 MW. Next the annual generation
(Equation 2) is sensitive to the quality of the local solar
resources and associated generation technology assumptions. With 1 MW
of capacity (from Equation 1) and a capacity factor of 20%, the
resulting annual generation is 1.8 GWh/year; however, assuming a
capacity factor of 10% (lower resource quality), we find an annual
generation of 0.9 GWh/year. Note that technical potential results
are also highly sensitive to the suitable area assumed.
As we can see, authors assume FPV power density of 100 MW/km2. How realistic is that? Going off the Wikipedia photovoltaic power plant list, energy density for the stations with area listed does not seem to exceed 70 MW/km2.
The problem here is also well represented in the linked press release (highlight mine):
“This is really optimistic,” said Nathan Lee, a researcher with NREL’s
Integrated Decision Support group and lead author of a new paper
published in the journal Renewable Energy. “This does not represent
what could be economically feasible or what the markets could actually
support. Rather, it is an upper-bound estimate of feasible resources
that considers waterbody constraints and generation system
Basically, these estimates make very generous assumptions of how "floatovoltaic" systems would perform in future. It would require a ~30% increase in nameplate power generation capacity of photovoltaic panels to meet the base power generation figure assumed in the paper. I would not call it unrealistic, but it's very optimistic.
It is also not clear why "Nature" author chose that specific value of capacity. The article by Nathan Lee et al. gives several estimates for different configurations of power plants, ranging from 3,039 to 7,593 GW of installed capacity.
P.S. Note that nameplate generation capacity is not a good metric to compare photovoltaic generators with fossil-fuel plants, as those produce power at a more stable rate. In other words, a fossil fuel plant, when running, produces energy at a relatively constant rate (often over 50% of its nameplate capacity), while solar power plant generation fluctuates based on current insolation (due to time of day/year and weather conditions), which leads to less power generated per day compared to a fossil-fuel plant with the same rating.