I believe the following exist:The answer to your question is "no". I've rewritten my previous answer to include details.
- A positive integer $d$ (anything $\geq 7$, I think), and a positive dimensional moduli space of unipotent groups of dimension $d$ defined over $\mathbb{Q}$. All real points in this moduli space yield real Lie groups whose underlying manifolds are diffeomorphic to $\mathbb{R}^d$.
- A real quadratic extension $K/\mathbb{Q}$, and a pair of distinct $K$-points in this moduli space that are taken to each other by the nontrivial automorphism of $K$.
By fixing an embeddingIn dimension $K \to \mathbb{R}$$d$ at least 7, we obtain two real algebraicthere are continuous positive-dimensional (non-isotrivial) families of nilpotent Lie algebras in characteristic zero. I had previously heard this as folklore, but some searching yields Ming-Peng Gong's dissertation, which has explicit presentations. By the exponential correspondence, this yields families of unipotent groups over these twosubfields of $K$$\mathbb{R}$, all of whose real-pointsanalytifications have underlying manifolds that are non-isomorphicdiffeomorphic to $\mathbb{R}^d$.
I will choose the family (147E), with generating basis $x_1,\ldots,x_7$, and nonzero brackets $[x_1,x_2] = x_4$, $[x_1,x_3]=-x_6$, $[x_1,x_5] = -x_7$, $[x_2,x_3]=x_5$, $[x_2,x_6]=\lambda x_7$, $[x_3,x_4]=(1-\lambda)x_7$, as real algebraic groups$\lambda$ varies over complex numbers satisfying $\lambda(\lambda-1) \neq 0$. The corresponding Over the complex numbers, the Lie groupsalgebras are non-isomorphic asdistinguished up to isomorphism by the value of $j(\lambda) = \frac{(1-\lambda+\lambda^2)^3}{\lambda^2(\lambda-1)^2}$. For each real $\lambda$, I will call the Lie groupsalgebra $L(\lambda)$, becauseand the corresponding Lie algebras aregroup $G(\lambda)$.
For any real quadratic extension $K/\mathbb{Q}$, there is a Galois-conjugate pair $(\lambda, \lambda')$ of irrational elements, such that $j(\lambda) \neq j(\lambda')$. One reason is that $j^{-1}j$ is not equivariant under translation by one - you can find the 6-element preimage of $j(\lambda)$ written out in Wikipedia's Modular lambda article. For such a pair, $L(\lambda)$ is not isomorphic to $L(\lambda')$, and $G(\lambda)$ is not isomorphic to $G(\lambda')$ as a real Lie group. However
However, the underlying groups of real points are isomorphic. The isomorphism is given by transporting the nontrivial Galois automorphism of $K$ inducesthrough the functor $- \otimes_K \mathbb{R}$ on Lie algebras, followed by exponentiation. This is highly discontinuous. For example, each $\exp(x_i) \in G(\lambda)$ is taken to $\exp(x_i) \in G(\lambda')$, but $\exp (\lambda x_i) \in G(\lambda)$ is taken to $\exp(\lambda' x_i) \in G(\lambda')$.
In summary, we have two Lie groups $G(\lambda)$ and $G(\lambda')$, we have an abstract group isomorphism on the underlying point-set$f$ (by transport of Galois) between them, and a diffeomorphism $g$ (because they are both diffeomorphic to $\mathbb{R}^7$) between them, but they are not isomorphic as Lie groups.