This is what the 45678 user guide says:
EN
Important information: Only use a high-quality Power Adaptor, PC or
Laptop for charging the rechargeable battery. Output 5V DC,
500-1500mA. Use the supplied LEGO® USB cable. How to charge the
battery: Charge the battery fully the first time it is used. The
battery can be charged when inserted in the TECHNIC Large Hub. Connect
the LEGO USB cable to a power source. The Charging Light will turn red
when the power source is connected. The Charging Light will turn green
when the battery is fully charged. Charging time for the battery is up
to six hours. The TECHNIC Large Hub can be used during charging but
this will increase the charging time. If the battery is fully
discharged and the TECHNIC Large Hub cannot be turned on when the
power source is connected, the battery will need up to one hour
charging time before the TECHNIC Large Hub can be turned on. Warning!
Do not dispose your battery by incineration. Dispose the battery in
accordance with the current legislation in your country. Do not
short-circuit the battery. Do not damage the battery. Do not dispose
in fire. Never use a damaged battery.
There is no information on how long the SPIKE hub can be connected and operating from an external DC power source.
For your purpose, it may work or it may shutdown. It depends on whether the GBC module draws more current than the USB power source can supply.