### Summary

While templating a JSON file where the JSON was created as part of a template (without using `to_json`) and where a macro was used to template some repeated parts, we found out that the generated JSON file was invalid JSON after switching from ansible-core 2.12 to ansible-core 2.13.

The problem seems to be that if the output of a macro looks like something that could be a Pyhon `repr()` result, it is converted back to Python datastructures.

### Issue Type

Bug Report

### Component Name

templar

### Ansible Version

```console
2.13.0
devel branch
```


### Configuration

```console
default
```


### OS / Environment

Linux

### Steps to Reproduce

```.bash
ansible localhost -m debug -a "msg='{% macro foo() %}{ "'"'"foo"'"'": "'"'"bar"'"'" }{% endmacro %}Test: {{ foo() }}'"
```
Or as a task:
```.yaml
- hosts: localhost
  tasks:
  - debug:
      msg: >-
        {% macro foo() %}{ "foo": "bar" }{% endmacro %}Test: {{ foo() }}
```


### Expected Results

```
"Test: {\"foo\": \"bar\"}"
```

### Actual Results

```console
"Test: {'foo': 'bar'}"
```
(This has `'` instead of `"`, so this isn't valid JSON.)
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
t = myenv.from_string(data)
            except TemplateSyntaxError as e:
                raise AnsibleError("template error while templating string: %s. String: %s" % (to_native(e), to_native(data)))
            except Exception as e:
                if 'recursion' in to_native(e):
                    raise AnsibleError("recursive loop detected in template string: %s" % to_native(data))
                else:
                    return data
            if disable_lookups:
                t.globals['query'] = t.globals['q'] = t.globals['lookup'] = self._fail_lookup
            jvars = AnsibleJ2Vars(self, t.globals)
            
            
            cached_context = self.cur_context
            self.cur_context = t.new_context(jvars, shared=True)
            rf = t.root_render_func(self.cur_context)
            try:
                if not self.jinja2_native and not convert_data:
                    res = ansible_concat(rf)
                else:
                    res = self.environment.concat(rf)
                unsafe = getattr(self.cur_context, 'unsafe', False)
                if unsafe:
                    res = wrap_var(res)
            except TypeError as te:
                if 'AnsibleUndefined' in to_native(te):
                    errmsg = "Unable to look up a name or access an attribute in template string (%s).\n" % to_native(data)
                    errmsg += "Make sure your variable name does not contain invalid characters like '-': %s" % to_native(te)
                    raise AnsibleUndefinedVariable(errmsg)
                else: