I have recently created a mock project to demonstrate clean lead generation event transfer from client side to server side then to CAPI - GA4 .
Turns out that it works really well.
The website was made by using React-vite .
Used Google cloud project to store my server-side container, and implemented the whole setup with various Google tag manager attributes and settings, consent mode v2 was correctly implemented.
In the end it even managed to bypass a third-party cookie blocking adblocker like the one integrated to Brave browser by using a simple reverse-proxy method. No rewrite method has been used though.
I called the project Velopair, it's imitating a fictional brand in Paris that repairs e-bikes mobile.