This Script-fu does three commands.
- Hide Original Text layer
- Duplicate Text Layer (that's visible)
- Layer to Image Size Duplicate text layer
It goes in the normal scripts folder /home/USERNAME/.config/GIMP/2.10/scripts
You will find it in Filters>Generic
This is the first Github page of mine to feature I tool I had no part in creating.